@observable selectedRowsSet = new Set()
@observable selectedRowsSet = new Set()
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? ...
use the original table component to encapsulate an extra layer of TableC, in the render method of the columns property to render switch, circularly. No matter how you modify the data view, it will not be updated, including using mobx, to ask how to solv...
there is a problem with using mobx: obtain the backend interface data through @ action, then assign a value to @ observable data, and then calculate whether the modal needs to be displayed from data through @ computed modalVisiable. How can I change t...
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 ...
1. Using computed in mobx does not work class ODOM { constructor(props) { console.log( how many times ) } @observable speed = 0 @action change(obj) { console.log(obj) Object.keys(obj).forEach(item => { this[item] = obj[it...
Business scenario: two lists, each using a child store , and then inheriting a common parent store . There are some common methods, such as operation paging, in parent store . The data structure is designed based on a list. Now how to implemen...
I tried normal and effective in non-strict mode ...
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...
The setState ({}, () = > {.}) function in react, and the second parameter callback function executes after the view is refreshed. but when using mobx, as shown above, how does this.commentsNum--, ensure that console? is executed after the view is r...
problem description define an attribute such as page,pageSize in store to do paging. Then in the component, click the paging callback and call acttion to modify the corresponding page and pageSzie, but undefined appears. related codes store *...
problem description in the process of creating a project, the decorator syntax always indicates that it cannot be parsed what methods have you tried found a lot of configuration methods for supporting modifiers on the Internet, and there are a lot...
as the title in fact, there are two major problems that need to be solved: 1. Extract the data into store and monitor the data. You can use Object.defineProperties or Proxy 2. You need to notify the component to update if the data chang...
1 react mobx project execution will report an error react mobx error Missing class properties transform, has installed transform-decorators-legacy and transform-class-properties, I don t know what went wrong store countStore.js import { observable, ...
babel-plugin-transform-decorators-legacy is installed and error message is configured in .babelrc store countStore.js import { observable, action, computed, runInAction, autorun, extendObservable } from mobx ; class CountStore { @observable...
problem description using the project written by react and mbox, I made the form control into a component and then looped through the parent component, which can be edited or deleted after being added. Now there is a problem. After adding multiple ent...
how do I get routing information for react-router4 in store? ...
related codes class BaseStore { @observable statusTabActiveKey = 0 } class ListStore extends BaseStore { @action.bound handleTabChange(index) { super.statusTabActiveKey = index } } const baseStore = new BaseStore() const listS...
A simple store, login, logout, and access to users in the current session class UserStore { @observable detail = {}; @observable userInfoId; @observable nickName; @action doLogin = (data) => { const _this ...
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...