Release v2.1.0
A minor release. Fixes a bug that caused named function expressions not to be detected properly in some cases.
Changelog
-
Describe a workaround for ambiguous function expressions in the README
-
Detect and allow using hooks inside named function expressions
const withHoc = <TProps extends object>(Component: ComponentType<TProps>) => function WrappedComponent(props: TProps) { // Naming the function expression allows using hooks const [state] = useState(); return <Component {...props} />; };