Release v2.0.0
This release adds support for detecting rule violations whenever hooks are used after a possible early-return.
Changelog
-
Report violations whenever a React hook is used after an early return.
For example, the following code sample now violates the rule:
function MyComponent({ counter }) { if (counter > 5) { return <div>Counter is over 5</div>; } useEffect(() => { console.log('Counter is', counter); }); return <div>{counter}</div>; }