Skip to content

useRequest 设置 cacheKey 后报错 Can't perform a React state update on a component that hasn't mounted yet. #2839

@zhuyankun

Description

@zhuyankun

useRequest 设置 cacheKey 后报错 Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions