So again, you want to add one thing “auth”, but need to add code in multiple places in your app. Server components promise to encapsulate that. Idea is that you can grab a component from npm, and it will handle all of that orchestration for you, and component will be your only one interface, so all configuration can be passed as props (of course it will be taken from your env/secret).
The promise is that you can encapsulate inside a components both client and server code.
What is value proposition of react component in comparison to older “mvc-inspired” frameworks? That you can drop a component in your code and call it a day. Don’t need to wire up separate controllers, models and views. Just one thing.
Now, if you want to add “auth” to your app (in react meta framework like next) you need to add component and probably add some routes and inject some middleware. With server components, you just add one component somewhere in the root of your app. Just one thing.
All that over the wire format, suspended data fetching etc, are a result of solving that problem and keeping in mind that those components are slightly different. It takes more work, but in return we can interleave both types of components nearly freely.
The key trick is that its "observables" (similar to Solid Stores or Svelte runes) aren't mixed with the actual data, and instead are sort of pointers to the data. This makes it very clear when you're passing reactive observables around, and when you just have vanilla data. There's never confusion about whether a particular property access is properly tracked or not. There's never that feeling that it "is not JavaScript".
It works well with React but is fundamentally framework-independent. We moved to it after trying SolidJS (which Svelte 5 is strongly influenced by) and we haven't looked back. IMO it deserves a lot more mindshare than it currently has.
But I want to use a server other than the default provided by Remix, i.e minimal Express. So, I found Hono. It looks interesting because it can run on many runtimes, and this time I want to try using Bun.
After researching Hono, it turns out it can render JSX directly from the server, which piqued my interest. Then I tried to make the JSX interactive, and finally, I used htmx. Lol.
And just yesterday, after spending hours I found a way to use PDFKit with Hono (Bun runtime), so I created a gist for reference:
https://gist.github.com/mansarip/eb11b66e7dc65cee988155275a1...
Anyway I'm still cautious about putting this Hono + htmx stack into production use.
I get it though, they had to ease people into 3d games. Still, kind of annoying when I just wanted to get to jumping and star collecting.
Then when I was hope for the holidays and every man I knew from my home town that was near my age was doing it. They'd watch a basketball game only to see if their 8 leg parlay would hit. Whatever app they were using even listed your all time wins/loses (probably legally required) and _all_ of them had all time loses over $500 and it had only been legalized a few months prior.
It's just a drain on the average person, the same was cigarettes are. I struggle with the freedom for personal choice to do what you want vs the collective better situation we get to form for ourselves as a society by banning these things, but I think I'm just leaning more towards the latter now. On the other hand, I think weed and alcohol should be legal, despite it affecting people's lives in negative ways, but the majority if their users are completely normal people.
This is such a tricky subject to me and I guess I'll just stop rambling now, but I am interested in what other people thing about societal restriction for a better group vs personal freedoms.
On my “nerd snipes” list I have project that merges squint and hwy framework. It sounds like bleeding edge for the sake of bleeding edge, but on the other hand sounds so compelling!
Great game and it is still amazing to me how after all these years I am still finding new moves or nuances of the physics engine to learn and practice.