10 ms·
Storing state in plain objects is a nice way to go when you pick a framework that doesn't care about state management. Forgo, Mithril, and Crank all require ex
by spiffytech 4y ago
Storing state in plain objects is a nice way to go when you pick a framework that doesn't care about state management.
Forgo, Mithril, and Crank all require explicit commands to rerender, unlike React and friends, which need visibility into everything that could ever trigger a rerender so they can handle it automatically.
You'd think manual rerenders would be a big pain, but I find it a small price for allowing by state to just be regular ol' variables. It makes everything feel simpler, like I'm just using the language instead of expressing my business logic through the framework.
- candiddevmike 4y agoMithril isn't necessarily explicit, rerendering happens on various user interactions by default.
- kevinfiol 4y agoMithril does full rerenders by default on event handlers and upon requests made with its request util. Normally, this would be a no-no in React land, but Mithril is fast enough that it's a non-issue, and it greatly simplifies state management (POJOs work great for global state, and closures enable a simple way to make stateful components).