|
|
|
|
|
by ludwigvan
86 days ago
|
|
React hooks always struck me as object-oriented programming reinvented through the back door of functions. We started with pure components, decided we needed state after all, and ended up with magic functions that stash and retrieve state from some hidden context — essentially re-deriving this with worse ergonomics and an implicit ordering contract. Some part of it was the functional language paradigms like immutability that were popular elsewhere at the time bolted on to JavaScript. What I find refreshing about Gea is that it doesn't fight the language. Stores are classes. Computed values are getters. State mutation is just assignment.
I've been waiting for a framework that embraces the actual paradigms of the language it's written in, rather than inventing a parallel universe of conventions. Excited to try this one. That said, I'm genuinely curious where the edges are. Was React's complexity accidental due to its architecture or was it the price of solving genuinely hard problems (concurrent rendering, suspense boundaries, fine-grained error recovery) (which by the way most consumers of the library did not care that much about)? Does Gea's simplicity hold up as apps get complex, or will we eventually hit patterns where the escape hatch is the complexity React already internalized? |
|
When I use static closures, functions are just functions, closures are closures, things just work. I don't have anything against OOP whatsoever, and I'm even fine with prototype-based OO, but the the way it's done in JS is littered with everything from papercuts to outright landmines. So a framework like WebComponents or this one, that forces me to use JS's OO mechanics, is a non-starter. Of course so are React hooks, which are barkingly insane for completely different reasons.