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

"react hot loader got: ... in ..." #1169

Closed
natew opened this issue Jan 31, 2019 · 5 comments
Closed

"react hot loader got: ... in ..." #1169

natew opened this issue Jan 31, 2019 · 5 comments

Comments

@natew
Copy link
Contributor

natew commented Jan 31, 2019

I'd like to debug this, but think first step is making this error message a bit more clear. I'm pretty confused what's happening and why. I'd be happy to add some messaging here once I can understand a bit.

Description

Getting this error:

image

What you are reporting:

Expected behavior

Should report why it's happening, steps to fix potentially, and show a bit better information.

Actual behavior

Imprecise message.

Environment

React Hot Loader version: 4.6.5

@theKashey
Copy link
Collaborator

got XXX instead of YYY and where. Usually, it would re-render the nested tree with a state loss.

This is from hot-renderer, when something went unpredictable, and after update XXX is not (new)XXX, but YYY. Memo vs SFC in this case.

For the message is clear, but the formatting is not quite. Probably I should pick something more console friendly.

@natew
Copy link
Contributor Author

natew commented Feb 1, 2019 via email

@theKashey
Copy link
Collaborator

theKashey commented Feb 1, 2019

Definitely. Could you parse a code around

<SomeProvider>
  <AndSomethingInsideProbablyMemoVersionOfChangeThemeByName/>
</SomeProvider>

@theKashey
Copy link
Collaborator

Confirmed. The issue is with React 16.7+, where fiber.elementType is Memo, but fiber.type is memo-ed component.

@theKashey
Copy link
Collaborator

There were 2 mistakes:

  • memo was not properly supported in hot-render, that's why you saw this message
  • reloading Providers was not supported at all. In all the tests they were created above reloading point.

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

No branches or pull requests

2 participants