Really nice to help people out here with the post :), but just to avoid confusion here, Scott is correct.
The article states the problem is with
import propTypes from 'prop-types';
This is not the case. the problem was simply React components expose a property propTypes, not PropTypes. For example, one could still write:
import PropTypes from 'prop-types'; ... MyComponent.propTypes ={ mySuperProp: PropTypes.string.isRequired. }
That part doesn't matter as you can declare whatever variable name you wish here.
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Really nice to help people out here with the post :), but just to avoid confusion here, Scott is correct.
The article states the problem is with
This is not the case. the problem was simply React components expose a property propTypes, not PropTypes. For example, one could still write:
That part doesn't matter as you can declare whatever variable name you wish here.