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

Refactor Custom Hooks to Use Redux Toolkit #54

Open
5 tasks
bkb-Git opened this issue Jun 17, 2024 · 2 comments
Open
5 tasks

Refactor Custom Hooks to Use Redux Toolkit #54

bkb-Git opened this issue Jun 17, 2024 · 2 comments
Labels
frontend This issue is primarly front-end focused type:refactoring For tasks focused on improving code structure, readability, or maintainability without changing its

Comments

@bkb-Git
Copy link
Contributor

bkb-Git commented Jun 17, 2024

Description

Currently, our application utilizes custom hooks for state management. To enhance consistency, scalability, and maintainability, we propose refactoring these custom hooks to use Redux Toolkit.

Tasks

  • Identify Custom Hooks: Locate all custom hooks currently in use for state management.
  • Define Redux Slices: Create slices using createSlice from Redux Toolkit for the state transitions handled by the custom hooks. Each slice should include actions and reducers.
  • Integrate Redux Store: Ensure the Redux store is properly configured with the slices using configureStore from Redux Toolkit.
  • Replace Custom Hooks: Refactor the components to use the Redux state and dispatch actions from the slices instead of custom hooks.
  • Testing: Thoroughly test the refactored components to ensure they work correctly with the Redux state.
    Ensure all existing functionalities are preserved.

Files and Locations

  • Custom Hooks: Identify specific files containing custom hooks (e.g., useChallengeMap.jsx).
  • Redux Setup: store.js for Redux store configuration, if not already present.
  • Components: Refactor components that currently use custom hooks.

Acceptance Criteria

  • All custom hooks related to state management are refactored to use Redux Toolkit.
  • Redux store is properly set up and integrated using Redux Toolkit.
  • Components using the custom hooks are updated to use Redux state and actions.
  • All functionalities work as expected post-refactor.
  • Comprehensive testing is completed.

Additional Information

  • Dependencies: Ensure all necessary Redux Toolkit dependencies are installed as listed in package.json.
  • Style Guidelines: Follow existing code style guidelines and patterns as used in the project.

References

  • Packages: Ensure to utilize the Redux Toolkit (@reduxjs/toolkit) as specified in package.json.
@bkb-Git bkb-Git added the type:refactoring For tasks focused on improving code structure, readability, or maintainability without changing its label Jun 17, 2024
@lingyundai
Copy link

Hi @bkb-Git, I would like to pick up this refactor task. I am from squad-gpt-guard. Thanks!

@bkb-Git
Copy link
Contributor Author

bkb-Git commented Jun 19, 2024

@lingyundai You can go ahead as long as you can keep up with your squad's deliverables

@bkb-Git bkb-Git added the frontend This issue is primarly front-end focused label Jul 1, 2024
@Ahmedr275 Ahmedr275 moved this to Todo in Issues board Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend This issue is primarly front-end focused type:refactoring For tasks focused on improving code structure, readability, or maintainability without changing its
Projects
Status: Todo
Development

No branches or pull requests

2 participants