NgRx documentation walkthrough tutorial reworked to use ngrx effects.
- Angular
- Angular CLI version 16.0.1.
- NgRx
- The main walkthrough tutorial takes a shortcut, and doesn't add effects, and just directly calls the service class in
app.component.ts
. - I removed the direct call to the service and added ngrx effects.
- My implementation could be improved. An error action could be added for when the API request fails.
- I went through the testing documentation, and it is slightly outdated, as the walkthrough was changed to use
createActionGroup
versus defining and exporting each action individually. You have to replace the imports ofonAdd
andonRemove
with an import ofBooksActions
. Then you callBooksActions.onAdd
in place ofonAdd
.
- Concrete Page - ngrx effects
- Dev.to - create reusable reducers
- Dev.to - action group creator