IDK who needs to hear this, but you don't have to pretend that React or Redux do "state management".
-
@slightlyoff I am gonna be really happy if this rant turns into a very well-reasoned essay promoting CRDTs...!
-
@slightlyoff fwiw, there's a tiny "Add text" below progressive enhancement that looks like it shouldn't be there
-
@eta Hah! Thanks. Will fix
-
@mogul ...but mostly not assuming you need client-side state caches when you don't (which is most of the time)!
-
Marc-Antoine Ruelreplied to Alex Russell last edited by
@slightlyoff In my toy project, I switched to sending unmodified app HTML.
For server-side injection, I do an additional write() to the tcp pipe adding a block "<script>let preloadedata = {{...}};<script>".
Then the web app can check if preloaded data is there or not and use it to save a round trip.
I don't understand why this is not the state of the art? Everything else sounds unnecessarily complex. -
Alex Russellreplied to Marc-Antoine Ruel last edited by [email protected]
@maruel Redux + SSR trends to result in huge inline JSON blobs, presumably to do the same. But then it gets the whole React dump truck emptied on top. View-source on the NYT sometime for a sense of how obscene this can get.
-
Marc-Antoine Ruelreplied to Alex Russell last edited by
@slightlyoff I recently listened to a talk about Remix and it sounded awfully complicated and fragile. I can't imagine making it fast.
-
Alex Russellreplied to Marc-Antoine Ruel last edited by
@maruel A lot of web developers have become disconnected from what "fast" even means. They think their slow things are fine, in part, because they literally don't know better.
-
@maruel Something you can't un-see once you've thought about it: the whole React-ish ecosystem forced tall and slow compiler toolchains down everyone's throats, but never bothered to use those compilers to elide runtime work...which, you *might* think, would be the point of a compiler.
Svelte *et al* did better, but in general there's no understanding of even the opportunity space among the current culture of frontend developers. They assume a floor of *at least* 45+KB of JS.
-
@maruel Anyway, I'll be here, rehashing my ~2016 critiques of desktop-era JS frameworks until they either:
- go out of fashion
- succeed in killing the web outright
- go out of fashion because they killed the webStop by any time!