FAQ
Last updated
Was this helpful?
Last updated
Was this helpful?
⚙️ Create both Reducer and Action Automatically
🤫 Get rid of verbose action declarations
️️️⤵️ Reduce imports of Action Types and Action Creators
💉 Use typed Services instead of dispatching Actions
🙅 No code generation that needs to be maintained manually
A Duck bundles the tasks of
As user, you only need to declare which method needs to be executed when a certain action is dispatched. Multiple Ducks are used to generate the automatically. You end up writing a class containing pure functions. Leave the rest to @ngrx-ducks/core
. Components are fully independent of Redux-Architecture
The version number of @ngrx-ducks is aligned with ngrx/platform. The major versions of both projects are compatible with each other.
Short answer: Nothing
👍 The Decorator API is still there and can be used. If you already use NgRx Ducks you do not have to worry about breaking changes in your app.
Short answers:
Better compatibility with NgRx’s types
Reduction of boilerplate
Make component fully independent of Redux-Architecture
Even better type-support
There are various reasons that motivated to improve the API of NgRx Ducks. A video discusses the differences in more detail. You are welcome to join the discussion.
The new API isn’t only ready for Angular 9. 🎉 Since NgRx-Ducks 8.4 you can already benefit from createDuck
and its friends.
Please note that NgRx Ducks 8 is hosted under the co-IT scope. You need to run npm install @co-it/ngrx-ducks@8.4
to get the Angular 8 compatible version.