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

Manage favoriteMovies with Redux #12

Open
samanthasbytes opened this issue Dec 3, 2024 · 0 comments
Open

Manage favoriteMovies with Redux #12

samanthasbytes opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
refactor Improve code structure, readability, or performance without changing functionality.

Comments

@samanthasbytes
Copy link
Owner

samanthasbytes commented Dec 3, 2024

Problem

  • The favoriteMovies state is currently managed locally in the FavoritesButton component. favoriteMovies is also required to display the users favorite movies in ProfileView.

Proposed Solution

  • Use Redux to manage the favoriteMovies state globally.
  • Dispatch actions to fetch the initial favorites and update the list when users add or remove a movie.
  • Refactor components like FavoritesButton and others that need favoriteMovies to connect to the Redux store.

Benefits

  • Simplifies data management
  • Reduces API calls
  • SSOT
@samanthasbytes samanthasbytes added the refactor Improve code structure, readability, or performance without changing functionality. label Dec 3, 2024
@samanthasbytes samanthasbytes self-assigned this Dec 3, 2024
@samanthasbytes samanthasbytes changed the title Refactor favoriteMovies state to use Redux for global accessibility Refactor favoriteMovies state to use Redux Dec 5, 2024
@samanthasbytes samanthasbytes changed the title Refactor favoriteMovies state to use Redux Manage favoriteMovies with Redux Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improve code structure, readability, or performance without changing functionality.
Projects
None yet
Development

No branches or pull requests

1 participant