
Building video games in React with Joe Hart
PodRocket - A web development podcast from LogRocket
00:00
How to Make a State Machine That Does Age of Empires
When I first put it up I was just like here's you state let's put some stuff in there and then I did the classic thing if you dump like an object in you state and then react doesn't handle that properly. It was kind of a microcosm of every long-lived website you've ever worked on where the state starts very simple and easy but gets more unwieldy over time. That is where the use reducer thing comes in to help with this sort of nested end state situation. There were other approaches which could have been taken as well such as using domain driven components rather than having them rendered by libraries. Could be really interesting to see how age of empires would
Transcript
Play full episode