createMutableDuck
Last updated
Was this helpful?
Last updated
Was this helpful?
Please read about first before continue here.
Working with immutable operations can be hard. It can also lead to code that is more difficult to read. The library allows you to simply mutate your state tree. Immer will take care about immutability for you.
NgRx Ducks provides a binding to immer that allows you to simply mutate your state. Therefore you simply need to use the function createMutableDuck
. Its usage is nearly the same like createDuck
. The only difference is that you do not need to return the next state
in a reducer function since immer takes care of it.
You will find a full example of a mutable facade at .