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.

Deciding where to do data fetching #42

Description

@Aztriltus

In the DeployedSiteCard.tsx component, it's using useEffect to do an async/await fetch to getPages https://github.com/SouperOS/NftOS/blob/main/src/modules/DeployedSiteCard/DeployedSiteCard.tsx#L27

Do you think it might be better to move this upwards and fetch it via the site.tsx page itself, and passing down the data to that component? Then maybe the component could be more reusable if we need. In the future when this page has more data to fetch, I think it might be clearer as to what is being loaded.

However, I do understand that sometimes it'll be easier to reuse this component the way it is if any other parent will also pass down the same data. I'm not too sure of the reusability aspect for now so I'm just putting this out here to understand the thought process behind it!

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