Skip to content

Hooks check overly aggressive (zillow/react-hooks/rules-of-hooks) #3

@IanMitchell

Description

@IanMitchell

In a function library with no React import, zillow/react-hooks/rules-of-hooks errors out on any function prefaced with use.

function useFeature(data) {
    return (data && data.feature);
}
error  React Hook "useFeature" is called in function "getData" which is neither a React function component or a custom React Hook function  zillow/react-hooks/rules-of-hooks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions