makeAutoObservable and make #2847
-
Hello, dear author: I did not find a description of the second and third arguments in the method... Demo: rootStore: false What does that mean? In mobx6, the documentation feels like it doesn't go deep enough, and I'm afraid of missing the meaning of some features and parameters. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 4 replies
-
It's documented here: https://mobx.js.org/observable-state.html#makeautoobservable "Members marked with false in the overrides argument will not be annotated" Function |
Beta Was this translation helpful? Give feedback.
-
2nd argument are annotations - same as 3rd argument are options |
Beta Was this translation helpful? Give feedback.
-
@kubk @urugator I have a followup question to this. This rootStore is always marked with |
Beta Was this translation helpful? Give feedback.
It's documented here: https://mobx.js.org/observable-state.html#makeautoobservable
"Members marked with false in the overrides argument will not be annotated"
Function
makeAutoObservable
automatically converts properties to observables, methods to actions and getters to computed. Usingfalse
in second arguments allows skipping this conversion for a specific field.