Coding task · Angular course · Module 10: State Management

Practice: NgRx Actions and Reducer

createAction defines an action with a type and optional props. The reducer is created by an @ngrx/store function that receives the initial state and a list of on() calls; each on() maps an action to a function that returns the new state.

Task

Complete the actions and reducer for managing samurai in NgRx.