News for hackers. Stuff that matters.
Re:Two custom React hooks by anchpop on Friday December 17, 2021 @03:55PM (#29598239)
> Therefore you would put everything you could into the Redux store, which is a bad idea -- you usually don't need form state in there, for example.

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

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.