I just added the xstate lib on my react project to control things...
I done three comparisons:
with "useState", the more confuse approach because I can have intermediary steps (for example, I can set loading by true, but I already have old data on other fields)
with "useReducer", a clear method, but so verbosely
with "useMachine" (xstate lib), a clear and not so big implementation like useReducer.
But for me, it's not the best approach, yet... maybe the old immutable objects approach should be a better solution. I'll try it also.
Thanks for your article, it was awesome to read.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I just added the xstate lib on my react project to control things...
I done three comparisons:
But for me, it's not the best approach, yet... maybe the old immutable objects approach should be a better solution. I'll try it also.
Thanks for your article, it was awesome to read.