React, Flux, GraphQL, Hack, HHVM...? All of this and more!
State management continues to be a hot topic in the React development circles. After Facebook introduced the Flux pattern, there was a plethora of solutions like Alt, but soon the community largely settled on Redux for state management.
Redux has become the de-facto state management tool for most React developers since it's introduction in 2015. Many have also enjoyed working with MobX for a more reactive approach to state management.
In the recent weeks there has been quite a bit of discussion in the online programming forums about Redux being too heavy weight for many applications. And so it seems that this turn of the tides has lead to many prominent React developers now promoting plain old setState as their preferred state management method for React.
I'm gonna say it. Flux hampered React innovation: led everybody right back to events and "templates" and intimately knowing data changes.— Ryan Florence 👍🏼 (@ryanflorence) May 8, 2017
While this may seem like a trollish tweet at first, it is true that in the last two years of the existance of React (and many other front end libraries and frameworks) have spent a disproportionately amount of time onanating over different state management approaches and philosophy.
In the middle of a really big react re-write at work currently, originally scoped the ticket to three days of work. Its been 6 days so far.— Matt Hamlin 💻 (@immatthamlin) May 8, 2017
In his effort he is faced with using Redux & Redux-Thunk, which seem overly confusing. Some hours later he had made the decision to move forward with the simpler method of simply using setState and completing the refactoring task in hours, rather than days:
Decided to do it, what would have taken 3 days to complete, finished in about 4 hours this morning. https://t.co/9wqaXy0rPY— Matt Hamlin 💻 (@immatthamlin) May 9, 2017