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

beta.20 bug #841

Closed
fwh1990 opened this issue Feb 5, 2018 · 7 comments
Closed

beta.20 bug #841

fwh1990 opened this issue Feb 5, 2018 · 7 comments
Assignees
Labels

Comments

@fwh1990
Copy link

fwh1990 commented Feb 5, 2018

Beta.20 cause rendering only element "012" in the browser.

ReactDom.render(
  <App />,
  document.getElementById('root')
);
<body>
  <div id="root">012</div>
</body>

node 9.5.0
babel 7.0.0.beta39
webpack 3.10.0

Rollback to beta.19 worked!

@theKashey
Copy link
Collaborator

Unable to reproduce - all the tests I have are working.
Could you please provide a bit more code?

@fwh1990
Copy link
Author

fwh1990 commented Feb 5, 2018

Open chrome devTools, switch to Elements

<div id="root">
  "0"
  "1"
  "2"
</div>

I just realize my root-component method AppComponent.render looks like:

render() {
   return [
     <A key="axxx" />,
     <B key="bxxx" />,
     <C key="cxxx" />,
  ];
}

Return elements[] is legal in React16+

Any relation?

@fwh1990
Copy link
Author

fwh1990 commented Feb 5, 2018

ReactDOM.render(
  <Provider store={store}>
    <AppComponent />
  </Provider>,
  document.getElementById('root')
);

@fwh1990
Copy link
Author

fwh1990 commented Feb 5, 2018

When I reduce array to 2 items, the render message turn to:

<div id="root">
  "0"
  "1"
</div>

@theKashey
Copy link
Collaborator

And there is no exception in console?

@theKashey theKashey self-assigned this Feb 5, 2018
@theKashey
Copy link
Collaborator

I've found a problem :(

@gregberge
Copy link
Collaborator

Should be fixed in beta.21.

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