3 ms·
The reason some things manage state via classes etc is because it can change. When health changes, maybe you want to change the UI to reflect the new health, w
by muzani 3y ago
The reason some things manage state via classes etc is because it can change.
When health changes, maybe you want to change the UI to reflect the new health, without running a "updateHealthUI(data.health)" each time. Maybe speed is also based on health. When a project has enough people and every file is changing every day, sometimes you just want something to observe another state without them understanding the context around it. Most of the inefficiency in a large team is communicating context.
Don't use more than what you need. Sometimes you don't need React.