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

change observable value in compontDidMount will not trigger rerender #3691

Open
AMDvsTMD opened this issue May 6, 2023 · 1 comment
Open
Labels

Comments

@AMDvsTMD
Copy link

AMDvsTMD commented May 6, 2023

Intended outcome:

Actual outcome:

releated line

if (!admin.mounted) {

admin.mounted = true

wrapper.call(this, realMethod, mixins, ...args)

because realMethod componentDidMount will run before patched componentDidMount where admin.mounted change to true

results reaction returned unexpected

How to reproduce the issue:

Versions
mobx@6.9.0 mobx-react@8

@urugator
Copy link
Collaborator

urugator commented May 6, 2023

mobx-react@8 was removed from npm, so you shouldn't be using it, but the info is still valuable, thank you for the report.

Note to self: wrap lifecycle methods in action?

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

No branches or pull requests

2 participants