mobxjs / mobx-react

React bindings for MobX
https://mobx.js.org/react-integration.html
MIT License
4.85k stars 349 forks source link

Can I use `inject` in normal function ? #774

Closed qinhuaihe closed 5 years ago

qinhuaihe commented 5 years ago

I have some mobx-state-tree stores, and I want to read the data in these stores in a normal function instead of a react component. Is this possible ?

danielkcz commented 5 years ago

That's up to you how you make your store available to such functions, eg. passed through arguments. Nothing this lib can help you with.

lock[bot] commented 4 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs or questions.