問題タブ [mobx-react]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
2 に答える
188 参照

javascript - How to bind the function by use @inject?

When I use the mobx-react ,I use inject decorator to transmit the store.But when I get the store such as

But when I want to call the function of store such as store.getUser() , I found that the context getUser function is not this , how can I bind this to the store ?

PS: the store is such as following :

I use the getUser like