React eslint error missing in props validation
You need to define propTypes as a static getter if you want it inside the class declaration: If you want to define it as an object, you need to define it outside the class, like this: Also it’s better if you import prop types from prop-types, not react, otherwise you’ll see warnings in console (as preparation for React 16):