Release v1.1.0
This minor release allows using hooks in function expression passed to React.memo
and React.forwardRef
.
Changelog
-
Allow using hooks inside React component decorators, such as
React.memo
orReact.forwardRef
.For example, the following code sample now does not violate the rule:
const MyComponent = React.memo(props => { useEffect(() => { console.log('Counter changed'); }, [props.value]); return <div>Counter: {props.value}</div>; });