Skip to content

Release v1.1.0

Compare
Choose a tag to compare
@Gelio Gelio released this 09 Feb 12:09
· 45 commits to master since this release
5c451b8

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 or React.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>;
    });