Want to validate Match params props in ESLint React-Router v4? I ran into something similar, eslint seems fine with only declaring what Im using as props and ignoring unused fields from match:
1 2 3 4 5 |
match: PropTypes.shape({ params: PropTypes.shape({ experiment: PropTypes.string, }), }).isRequired, |
If you like this question & answer and want to contribute, then write your question & answer and email to freewebmentor[@]gmail.com. Your question and answer will appear on FreeWebMentor.com and help other developers.