I'm setting up a new React with the help of: Create React App
However, I'm running into a linting issue. I'm receiving the following linting error 'PropTypes' is not defined. (no-undef)
.
Here is the code that is causing the issue:
import React, { Component } from 'react';
import PropTypes from 'prop-types';
class Routers extends Component {
static propTypes = {
history: PropTypes.object.isRequired
};
...
I tried playing around with the react/prop-types rule, but to no avail.
'PropTypes' is not defined
or'propTypes' is not defined
– Matron'propTypes' is not defined
. Thanks I will look into it. – Duboseesline v4.x
instead of using the one that is shipped with the repo? – Matron