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

Crash inside React (?) #23

Closed
gaearon opened this issue Feb 28, 2019 · 3 comments

Comments

@gaearon
Copy link
Collaborator

commented Feb 28, 2019

Not sure how this happened, and where the code lives. Is this from debug-tools?

hooks.memoizedState is null but we read [0] from it.

You can see the actual hook is the context one. Maybe it's the issue you fixed on master.

screen shot 2019-02-28 at 5 29 43 pm

screen shot 2019-02-28 at 5 29 56 pm

screen shot 2019-02-28 at 5 30 13 pm

@bvaughn

This comment has been minimized.

Copy link
Owner

commented Feb 28, 2019

Yeah, I'm pretty sure that's being caused by what I fixed in facebook/react/pull/14940 (but it hasn't yet been released)

@bvaughn bvaughn added the 😭 bug label Feb 28, 2019

@bvaughn

This comment has been minimized.

Copy link
Owner

commented Feb 28, 2019

This bug could be reproduced previously by using the browser extension to inspect a component that used a context hook followed by a stateful hook (e.g. state, memo). In the demo, this could be reproduced by selecting the TreeContextController node.

I've updated the demo page with an updated version of react (built with facebook/react/pull/14940 and facebook/react/pull/14906) and verified that it's no longer broken.

@bvaughn bvaughn closed this Feb 28, 2019

@bvaughn

This comment has been minimized.

Copy link
Owner

commented Feb 28, 2019

I also added an integration test to react d450ead to help guard against this regression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.