change observable value in compontDidMount will not trigger rerender
Intended outcome:
Actual outcome:
releated line
https://github.com/mobxjs/mobx/blob/7cdc7ecd6947a6da10f10d2e4a1305297b816007/packages/mobx-react/src/observerClass.ts#L216
https://github.com/mobxjs/mobx/blob/7cdc7ecd6947a6da10f10d2e4a1305297b816007/packages/mobx-react/src/observerClass.ts#L132
https://github.com/mobxjs/mobx/blob/7cdc7ecd6947a6da10f10d2e4a1305297b816007/packages/mobx-react/src/utils/utils.ts#L120
because realMethod componentDidMount will run before patched componentDidMount where admin.mounted change to true
results reaction returned unexpected
How to reproduce the issue:
Versions [email protected] mobx-react@8
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?