Skip to content

Upgrading eslint-plugin-react-hooks 4 to 5

Breaking4.6.2 → 5.2.0Breaking2New1Changed7Fixed4

BreakingUpgrade verdict

2 breaking changes.

  • The linter now only treats names starting with a capital letter as components, so names beginning with an underscore are flagged.
  • The experimental hook useEvent is now called useEffectEvent, so code using the old name must be updated.
2 items need code or config changes
Breaking2
Component names now need to start with an uppercase letter instead of a non-lowercase letter, so _Button or _component are no longer valid.
_Button_componentuseState
Renames experimental useEvent to useEffectEvent.
useEventuseEffectEvent