Skip to content

React.PropTypes is deprecated #52

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

Open
rafkhan-wg opened this issue Oct 24, 2017 · 2 comments
Open

React.PropTypes is deprecated #52

rafkhan-wg opened this issue Oct 24, 2017 · 2 comments

Comments

@rafkhan-wg
Copy link

https://reactjs.org/docs/typechecking-with-proptypes.html

@jseminck
Copy link

It seems like these repos are not maintained anymore:

"A solution for building reusable components for d3 charts, NOT MAINTAINED."

@zmiller346
Copy link

To get the files to work, you need to go into any applicable or broken file, and add:

var PropTypes = require('prop-types');
var createReactClass = require('create-react-class');

To the top along with any other require statements, then you have to change the create class line to:

module.exports = createReactClass({

And finally, go to any instance of PropTypes with React in front of it (not things like createElement, keep those the same), and remove the React. or _react. in front of it. It's kind of tedious, but I got it all working with that.

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

3 participants