3 ms·
Monster? It's very straightforward, functional and easy to follow. You could easily refactor that and break it up without fuss. Not sure what the big deal is he
by whalesalad 5y ago
Monster? It's very straightforward, functional and easy to follow. You could easily refactor that and break it up without fuss. Not sure what the big deal is here. The fact that it operates on a state machine makes it even easier. You can see all the different ways the UI will render by stubbing the state value.
- dmix 5y agoThe problem is when you have a large app with multiple components and plenty of state to manage. These things always look easy when they are small toy isolated projects. This sort of thing in a production app would be littered with global state, it would be difficult to change anything / refactor without serious anxiety, if you have multiple developers good luck getting them to program the same predictable way, importing libraries see previous point, etc, etc.
- dsego 5y agoYes it's okay for this example. I think it can get out of hand.