3 ms·
The React ESLint plugin's no-unknown-property rule is handy for catching (and automatically fixing) this: https://github.com/yannickcr/eslint-plugin-react/blob
by insin 10y ago
The React ESLint plugin's no-unknown-property rule is handy for catching (and automatically fixing) this:
https://github.com/yannickcr/eslint-plugin-react/blob/master/docs/rules/no-unknown-property.md https://github.com/yannickcr/eslint-plugin-react/blob/master...
- inimino 10y agoGood to know, thanks. That's a good stop-gap, but the tool itself should either pass through everything to the HTML or throw errors on anything that isn't going to get passed through. The silent failure mode is a UX bug.
- ramchip 10y agoIf I understand your comment correctly, this is checked in more recent versions of React: https://facebook.github.io/react/warnings/unknown-prop.html https://facebook.github.io/react/warnings/unknown-prop.html
- inimino 10y agoIt does seem to be the same issue. That's great, it will certainly avoid some frustration.