How to solve prop spreading is forbidden in custom route component?

ES lint discourages the use of prop spreading so that no unwanted/unintended props are being passed to the component. More details here: https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/jsx-props-no-spreading.md

To disable it for the particular file, you can put: // eslint-disable jsx-props-no-spreading at the top line in your component file. For disabling it for all files, try this: Disable in EsLint "react / jsx-props-no-spreading" error in Reactjs


For ESLint is important which type of comment do you use, the legit one is:

/* eslint-disable react/jsx-props-no-spreading */