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

Support React v16 #94

Closed
viztor opened this issue Dec 5, 2017 · 11 comments
Closed

Support React v16 #94

viztor opened this issue Dec 5, 2017 · 11 comments

Comments

@viztor
Copy link

viztor commented Dec 5, 2017

Now with React v16
it will throw exception createClass not a function.

@JakeSidSmith
Copy link
Owner

@viztor this lib uses the create-react-class module, which should still be compatible with React 16.

If not, I will be re-writing v3 in ES6 / TypeScript, and so will using actual classes.

@dargue3
Copy link

dargue3 commented Dec 13, 2017

+1

I don't believe this works with React 16, unless you're saying we need to include create-react-class in our dependencies?

@JakeSidSmith
Copy link
Owner

It is a dep of react-reorder: https://github.com/JakeSidSmith/react-reorder/blob/master/package.json#L34

Can someone explain what exactly is the issue with React 16? :)

@AntCrick
Copy link

+1 Though I think it could be an issue with the version that is on npm as i used npm install to install this and it's installed react-reorder@3.0.0-alpha.4 and the react-reorder package.json doesn't have create-react-class in the dependencies that i can see so could be that maybe?

@JakeSidSmith
Copy link
Owner

Ah, that's it! Thanks @AntCrick will update now and publish a new alpha version.

@JakeSidSmith
Copy link
Owner

@AntCrick @dargue3 @viztor have published a fix at 3.0.0-alpha.5.

Please try this out, and if your issue is fixed, then close this issue. 🙂

@birdy90
Copy link

birdy90 commented Dec 20, 2017

I get Uncaught TypeError: Cannot read property 'oneOfType' of undefined because of

   ...
   var PropTypes = React.PropTypes;
   Reorder.propTypes = {
      component: PropTypes.oneOfType([PropTypes.func, PropTypes.string]),
   ...

And as it's said here https://reactjs.org/docs/typechecking-with-proptypes.html it is deprecated and moved to some package. What should I do to handle this problem?

@JakeSidSmith
Copy link
Owner

Ah, poop. So many changes to make. Will try to get this sorted shortly.

@birdy90
Copy link

birdy90 commented Dec 20, 2017

Maybe it will help: there's recommendations for migrating

@JakeSidSmith
Copy link
Owner

JakeSidSmith commented Dec 20, 2017

@birdy90 published some fixes at 3.0.0-alpha.6.

@JakeSidSmith
Copy link
Owner

@AntCrick @dargue3 @viztor should now work nicely with React 16.

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

5 participants