AlexsLemonade / AlexsLemonade/refinebio-web
Add updateMyDataset helper to useDatasetManager
@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
- Add a new method
updateMyDatasetthat accepts the dataset fetched from the API - Replace the
setMyDatasetcalls with this newly added wrapper method
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.