React eslint error missing in props validation

You need to define propTypes as a static getter if you want it inside the class declaration: static get propTypes() { return { children: PropTypes.any, onClickOut: PropTypes.func }; } If you want to define it as an object, you need to define it outside the class, like this: IxClickOut.propTypes = { children: PropTypes.any, onClickOut: PropTypes.func, … Read more