Re:Two custom React hooks
by Jcampuzano2 on Friday December 17, 2021 @06:09PM
(#29599449)
But this could also just as easily be solved by moving the form state up, or at least the preservation of each tabs state one level up, without using redux at all.
You'd still preserve on tab change just as easily, while using just reacts mental model.
Why's that? IME it is usually simplest to just put everything in redux. For example, if you have a form under some kind of tab navigation thing, you'd ideally want the form state to be preserved even when they tab out and then back in. Putting it in redux means you don't really have to think about it