Skip to content

Refactor data fetching logic in SamplesContextProvider using separate useEffect hooks #460

Description

@nozomione

Context

The data fetching in SamplesContextProvider is currently handled by a single useEffect that triggers when either the samplesQuery or myDataset state changes. Within this useEffect, the loading state is set to true before making the API call.

Problem or idea

We want to separate the data-fetching logic into multiple useEffect hooks:

  • One useEffect for setting loading to true when samplesQuery or myDataset change.
  • Another useEffect for making API call when loading changes to true.

Solution or next step

Implement the two usEffect described above in SamplesContextProvider.

Metadata

Metadata

Assignees

Labels

Type

No type

Fields

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