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] Drop support for React v15.x and take advantage of v16.0.0 once released #7670

Closed
shigurenimo opened this issue Aug 5, 2017 · 9 comments
Labels
on hold There is a blocker, we need to wait
Milestone

Comments

@shigurenimo
Copy link

Failed prop type: Invalid prop `children` of type `array` supplied to `MuiThemeProvider`, expected a single ReactElement.

In react@16 we can return an array with the render method.
In this way, should not "MuiThemeProvider" allow arrays?

render(
    <MuiThemeProvider theme={theme}>
      <LeftMenu />
      <Content />
      <Snackbar />
    </MuiThemeProvider>,
  document.querySelector('div')
)

Versions

  • Material-UI: 1.0.0-beta.2
  • React: 16.0.0-beta.3
  • Browser: Safari
@oliviertassinari
Copy link
Member

oliviertassinari commented Aug 5, 2017

@uufish I think that we should wait for officially dropping [email protected] before updating the propTypes and possibly some of our component implementations.

Check list:

  • Update the propTypes
  • Update the render methods
  • Remove Portal dead code
  • Upgrade enzyme

@oliviertassinari oliviertassinari added on hold There is a blocker, we need to wait v1 labels Aug 5, 2017
@oliviertassinari oliviertassinari changed the title Failed prop type: Invalid prop children of type array supplied to MuiThemeProvider [react] Drop support for React v15.x and take advantage of v16.0.0 once released Aug 5, 2017
@isitrita
Copy link

@oliviertassinari React 16 have already been released, will you remove status onHold from this issue?

@oliviertassinari
Copy link
Member

@isitrita https://twitter.com/MaterialUI/status/913019335995568128

@oliviertassinari oliviertassinari removed the on hold There is a blocker, we need to wait label Sep 27, 2017
@istarkov
Copy link
Contributor

One of react-jss deps contains a library theming with non peer react 15 dependency, seems like it caused a bug in some of our projects

@oliviertassinari
Copy link
Member

@istarkov This one was for you #8408 ❤️ . Anyway, this PR #8121 might help as Material-UI runtime code do not rely on theming. But if you are saying that it fails at the installation time, you might be able to use this trick: reactjs/react-transition-group#151 (comment)

@oliviertassinari
Copy link
Member

I have found one limitation with using the new array children capability of React@16. Preact do not support it (preactjs/preact-compat#432).
So we have a call to make, does supporting preact worth the extra divs in the DOM for React users? #7721

@eyn
Copy link
Contributor

eyn commented Oct 8, 2017

There are quite a few other libraries in the eco system that don't support react 15 yet (zeit/next.js) for one so I'd vote to keep react 15 support for a while. It might also help lessen the curve of upgrading to 1.0 from 0.1x

@leMaik
Copy link
Member

leMaik commented Oct 8, 2017

@eyn zeit/next.js will support react 16 soon: vercel/next.js#2997 (comment) 🎉

@oliviertassinari oliviertassinari added on hold There is a blocker, we need to wait and removed v1 labels Oct 9, 2017
@sakulstra
Copy link
Contributor

sakulstra commented Oct 18, 2017

fyi: next 4 supports react 16 (and dropped 15 support)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on hold There is a blocker, we need to wait
Projects
None yet
Development

No branches or pull requests

7 participants