how does mobx initialize store, because I want to get the data from the background, but in some components, how do I initialize it in store? do I new, in the root node of the project, app.jsx, and then call mobx"s action?
how does mobx initialize store, because I want to get the data from the background, but in some components, how do I initialize it in store? do I new, in the root node of the project, app.jsx, and then call mobx"s action?
1. Create a new file that defines the initialization of store, and then introduces
2 components that need to use store in the root directory. Just inject it directly
according to the documentation, Mobx, wants to get and call parameters in the form of inject in the sub-component, but there is a undefined problem? Timer.ts interface IProps { timerStore?: TimerStore; } interface State {} inject( timerStore ...
I have two table components of antd, and to achieve the shuttling box effect on them, I now have two ideas to waver! 1. Create a parent store (mobx), with two table components whose store inherits its array 2. In the array used by the two table comp...
how to design store in mobx? If you use mobx, do you want to use react s state? or not? write the operation of the form, make changes when each field needs to add a change method, feel more tedious, is there a better way? can you provide some mobx ...
has found a lot of information, and it seems that the division of store is recommended for flattening. Up to two layers, such as { home:homeStore, about:aboutStore } so what about the above structure for complex pages? Like ho...