AlexsLemonade / AlexsLemonade/refinebio-web

Add updateMyDataset helper to useDatasetManager

Open
#393 0 comments 0 reactions 1 assignee View on GitHub

@nozomione is already working on this.

Since Oct 18, 2024.

Dominant language
JavaScript
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Context

Epic: #391

Feature branch: feature/epic-refacter-use-dataset-manager-hook

Currently, we store and update the user-saved My Dataset using the context state myDataset and its setter setMyDataset.

This setter is used in the useDatasetManager hook and called from hook's methods (e.g., getDataset) on API requests.

In this issue, we want to create a wrapper helper method responsible for setting myDataset and to be called from the hook methods instead of directly invoking the context state setter.

Problem or idea

We should replace all setMyDataset calls within the hook with the new wrapper method described above.

Solution or next step
  1. Add a new method updateMyDataset that accepts the dataset fetched from the API
  2. Replace the setMyDataset calls with this newly added wrapper method

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.