Skip to content
This repository has been archived by the owner on Dec 31, 2020. It is now read-only.

observer causes app to break when using 0.61's fast refresh #784

Closed
ertankara opened this issue Sep 28, 2019 · 4 comments
Closed

observer causes app to break when using 0.61's fast refresh #784

ertankara opened this issue Sep 28, 2019 · 4 comments

Comments

@ertankara
Copy link

ertankara commented Sep 28, 2019

How to reproduce

Wrap your react native function component with observer and refresh twice, the first refresh doesn't break it but following refresh does.

Erorr is -> Invariant Violation: Rendered fewer hooks than expected. This may be caused by an accidental early return statement.

If I remove the observer it'll refresh without a problem, so I think this issue deserves to be here rather than on React-Native project.

@danielkcz
Copy link
Contributor

danielkcz commented Sep 28, 2019

Duplicate to mobxjs/mobx-react-lite#226

It's more likely the fast refresh is a problem :)

@gaearon
Copy link

gaearon commented Oct 14, 2019

Just noting that the problem was the way they interact, and that a fix is possible. mobxjs/mobx-react-lite#226 (comment)

@danielkcz
Copy link
Contributor

Please update to [email protected] for the fix.

@lock
Copy link

lock bot commented Jan 14, 2020

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants