The great thing about having producers outside components is that it is becomes very straightforward to test them independent of our UI logic.
However, in some cases your logic might be so simple that you want to use Immer inside some of your react components. In this lesson we will discover how. For example by using “useImmer” or “useImmerReducer” from the use-immer package.