Skip to content

refetch function in MantleProvider should be memoized #2

@Jimin-Genie

Description

@Jimin-Genie

Problem

  • We wanted to refetch some data inside useEffect
  • Linting rule dictates that if we use refetch inside of useEffect it has to be included in the dependency array.
  • In each UI component re-render, we noticed that the refetch function is redefined and retriggering the use-effect every time.

refetch function defined here, should be memoized.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions