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

No re-render triggered when root component returns React.Fragment #799

Closed
andybarron opened this issue Jan 16, 2018 · 2 comments
Closed
Labels

Comments

@andybarron
Copy link

Might be a bit edge-case-y, but the following code won't trigger a re-render (even though the console claims to have hot loaded successfully):

import { hot } from 'react-hot-loader';
import React from 'react';

const App = () => (
  <React.Fragment>
    <h1>Example</h1>
    <p>No hot reload worky :-(</p>
  </React.Fragment>
);

export default hot(module)(App);

It wouldn't be totally unreasonable if this case just didn't work, but if so, that should be documented somewhere 👍

NB: The example above is simplified from my actual use case, so let me know if you can't get repro, and I can share more details.

@theKashey
Copy link
Collaborator

We actually don’t have a single test for this case, as long they are the same for react 15 and 16.
Easy to test. I hope easy to solve.

theKashey added a commit that referenced this issue Jan 16, 2018
theKashey added a commit that referenced this issue Jan 19, 2018
@gregberge
Copy link
Collaborator

Fixed in 4.0.0-beta.16.

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

No branches or pull requests

3 participants