Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update model layer docs with more strict rules around mobx.action and async/Promise functions #5033

Open
tephenavies opened this issue Nov 28, 2020 · 2 comments

Comments

@tephenavies
Copy link
Member

Wrapping an async function with mobx.action can hide mobx reactivity bugs. mobx.action (and flow, runInAction, untracked, etc.) should be used conservatively in places where a user causes a state mutation, or when an async request (started by a user) finishes and state must be mutated.

@tephenavies
Copy link
Member Author

See #5026 and #5032 for an example of this type of problem.

@wibily
Copy link
Contributor

wibily commented Jul 7, 2021

ticket is for updating docs for contributors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants