Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
if the reducer changes the state and returns it, then subscribers (components) will not be notified about its change, since redux will think that the state has not changed, because the comparison of the previous and next state is not deep, but only the reference is compared, and in general it is recommended in FP use pure functions and work with everything immutably, this makes it easier to debug and simplifies testing.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question