Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Challenge: Creating Redux Actions | Redux Toolkit Challenge Workshop
State Management with Redux Toolkit in React

bookChallenge: Creating Redux Actions

Step 2

Focus on creating actions for managing goals. Actions are objects that describe the changes we want to make to the state. By creating actions, we can update the Redux store accordingly.

Example

Challenge

  1. Open the goalAction.js file.
  2. Use the correct function from the @reduxjs/toolkit package to create actions.
  3. Specify the correct action types using the target element goal and indicate the action for each action.
  4. To remove a goal, set the action type as goals/removeGoal.
  5. To add a goal, set the action type as goals/addGoal.
  1. The createAction function simplifies the process of creating action creators.
  2. The action types should be descriptive and reflect the purpose of the action.
  3. Using string constants or variables is recommended for consistency and easier refactoring.

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 4

Ask AI

expand

Ask AI

ChatGPT

Ask anything or try one of the suggested questions to begin our chat

Awesome!

Completion rate improved to 4.17

bookChallenge: Creating Redux Actions

Swipe to show menu

Step 2

Focus on creating actions for managing goals. Actions are objects that describe the changes we want to make to the state. By creating actions, we can update the Redux store accordingly.

Example

Challenge

  1. Open the goalAction.js file.
  2. Use the correct function from the @reduxjs/toolkit package to create actions.
  3. Specify the correct action types using the target element goal and indicate the action for each action.
  4. To remove a goal, set the action type as goals/removeGoal.
  5. To add a goal, set the action type as goals/addGoal.
  1. The createAction function simplifies the process of creating action creators.
  2. The action types should be descriptive and reflect the purpose of the action.
  3. Using string constants or variables is recommended for consistency and easier refactoring.

Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 3. ChapterΒ 4
some-alt