Skip to content
This repository was archived by the owner on Oct 5, 2024. It is now read-only.
This repository was archived by the owner on Oct 5, 2024. It is now read-only.

Using useMemo instead of generic function #44

Description

@Aztriltus

For rendering the card content https://github.com/SouperOS/NftOS/blob/main/src/modules/UnstakedNFT/UnstakedNFT.tsx#L29, do you think it might be better to use the useMemo function instead?

I can see a few benefits of using useMemo here:

  • I think the component will not re-render unnecessarily if the dependencies (nfts, isLoading) are not different
  • When dependencies do change, we know what causes it to re-render by looking at the dependency array

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions