Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add updateMyDataset helper to useDatasetManager #393

Open
nozomione opened this issue Oct 18, 2024 · 0 comments
Open

Add updateMyDataset helper to useDatasetManager #393

nozomione opened this issue Oct 18, 2024 · 0 comments
Assignees

Comments

@nozomione
Copy link
Member

nozomione commented Oct 18, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant