v5.0.0
allowComponentDidCatchhas been replaced withallowErrorBoundary. LikeallowComponentDidCatch,allowErrorBoundarydefaults to true, butallowErrorBoundaryallows class components that usecomponentDidCatchand/orgetDerivedStateFromError. No change is required if you're using the defaults for this lint rule. If you've disabledallowComponentDidCatch, you'll need to make the following change:
rules: {
"react-prefer-function-component/react-prefer-function-component": [
"error",
- { allowComponentDidCatch: false },
+ { allowErrorBoundary: false },
],
},See #29, thanks @henryqdineen!
New Contributors
- @henryqdineen made their first contribution in #29
Full Changelog: v4.0.1...v5.0.0