dillon1000/react
Commit
Browse files Improve lint error messages for useEffectEvent (#34669)
Called Before: > `logEvent` is a function created with React Hook "useEffectEvent", and can only be called from the same component. Called After: > `logEvent` is a function created with React Hook "useEffectEvent", and can only be called from Effects and Effect Events in the same component. Referenced Before: > `logEvent` is a function created with React Hook "useEffectEvent", and can only be called from the same component. They cannot be assigned to variables or passed down. Referenced After: > `logEvent` is a function created with React Hook "useEffectEvent", and can only be called from Effects and Effect Events in the same component. It cannot be assigned to a variable or passed down.
Changed paths2 files
First-parent comparisonpackages/eslint-plugin-react-hooks/__tests__/ESLintRulesOfHooks-test.js ModifiedM packages/eslint-plugin-react-hooks/src/rules/RulesOfHooks.ts ModifiedPatch
Files changed
Rendering syntax-highlighted changes…