Do we automatically get object immutability for all domain instances when using NGRX or NGXS? Most of the contexts that I read up on seem to indicate this, but there's also wording like"When we use NGRX with immutable objects ...", so just want to double check that we are not suppose to use something like immutable.js
in addition to ngrx?
No, we don't. If you don't use immutable library, passed payloads must be deeply cloned manually inside reducer (NGRX) or action handler (NGXS) before added to the state.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With