Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Apprendre Challenge: Actions | Redux Toolkit
Expert React

bookChallenge: Actions

Step 2: Create actions

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.

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 10

Demandez à l'IA

expand

Demandez à l'IA

ChatGPT

Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion

Suggested prompts:

Posez-moi des questions sur ce sujet

Résumer ce chapitre

Afficher des exemples du monde réel

Awesome!

Completion rate improved to 1.96

bookChallenge: Actions

Glissez pour afficher le menu

Step 2: Create actions

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.

Tout était clair ?

Comment pouvons-nous l'améliorer ?

Merci pour vos commentaires !

Section 3. Chapitre 10
some-alt