-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Consolidate behavior of React.forwardRef & observer #2527
Comments
I am not sure if this is a bug or intended behavior? |
I guess we should have changed this with a major release, but it evaded our attention. For now, you have to use |
By |
I understand that |
Well, it would of course require to do something like |
Yep, I also just checked it and it seems like it would be enough to just copy-paste this 10 lines of code? If so I could make PR and update README a little bit maybe |
Well, we should have some tests for it too and need to consider how it will behave together with But PR for starting the path would be certainly welcome. |
After that, the parent component throws an error. |
@guhyeon Please, if you have encountered a bug, open the new issue with a proper template. Such a shout in the dark is not helpful at all. |
@patternleaf Thank you! I'll close the issue then. |
Basically code says it all:
Intended outcome
No error, same behavior between
mobx-react
andmobx-react-lite
Actual outcome
observer
decorator frommobx-react-lite
fails with an ErrorHow to reproduce the issue
Use code from above or this codesandbox https://codesandbox.io/s/mobx-react-lite-observer-bug-57hv6?file=/src/App.js
Versions
mobx 6.0.1
mobx-react 7.0.0
mobx-react-lite 3.0.0
react 16.13.1
react-dom 16.13.1
The text was updated successfully, but these errors were encountered: