I’ve been working with Redux to manage component state and have found it’s a lot more work than just using
this.state. A lot for the time there doesn’t seem to be much of a payoff except when you want to share that state with other components. The zealots of the “One true flow” seem to never make exceptions: Everything must got through the Action > Reducer > Component cycle which is laborious to implement (especially of your doing testing).
I’ve come to see Redux as global state and this.state as local state, as one sees global and local variables, but nobody seems to talk about this or come up with rules-of-thumb as to weather using an mix of both as permissible and if it is when is it OK?
For example i’m finding that with controlled forms, in which the state is never needed outside the component until after it is submitted, its faster and easier to just use local state and update Redux after the submitted data has changed something on the server.
My rule of thumb is now: If the data is not referenced outside the component then use local state. If its share between components use global (Redux).
Is there some rationale as to why this would be a misnomer? Arguments for or against?