export default inject((stores, props, context) => ({
compStore: stores.compStore,
}))(observer(Comp))
//ro ---
@observer(["compStore"])
There are two ways of . There are only @ observable attributes in props, and has no @ action function
.export default inject((stores, props, context) => ({
compStore: stores.compStore,
}))(observer(Comp))
//ro ---
@observer(["compStore"])
There are two ways of . There are only @ observable attributes in props, and has no @ action function
.Previous: An algorithm for finding a js array
Next: How to use a regular match to a country with a 'horse' in its name?
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...
related codes class BaseStore { @observable statusTabActiveKey = 0 } class ListStore extends BaseStore { @action.bound handleTabChange(index) { super.statusTabActiveKey = index } } const baseStore = new BaseStore() const listS...