Challenge: 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
- Open the
goalAction.js
file. - Use the correct function from the
@reduxjs/toolkit
package to create actions. - Specify the correct action types using the target element
goal
and indicate the action for each action. - To remove a goal, set the action type as
goals/removeGoal
. - To add a goal, set the action type as
goals/addGoal
.
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 10
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Suggested prompts:
Fragen Sie mich Fragen zu diesem Thema
Zusammenfassen Sie dieses Kapitel
Zeige reale Beispiele
Awesome!
Completion rate improved to 1.96
Challenge: Actions
Swipe um das Menü anzuzeigen
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
- Open the
goalAction.js
file. - Use the correct function from the
@reduxjs/toolkit
package to create actions. - Specify the correct action types using the target element
goal
and indicate the action for each action. - To remove a goal, set the action type as
goals/removeGoal
. - To add a goal, set the action type as
goals/addGoal
.
War alles klar?
Danke für Ihr Feedback!
Abschnitt 3. Kapitel 10