Readit News logoReadit News
dhucerbin commented on React for Two Computers   overreacted.io/react-for-... · Posted by u/abraham
halflife · 10 months ago
Ok I probably need to read deeper into server components and look at specific implementation. Your saying that the same component, in the client makes sure that you have a live session (a la JWT in local storage), but in the backend checks that the client requests arrived with the correct credentials?
dhucerbin · 10 months ago
Kinda? I’m starting to regret using auth as an example! Dan recommended Sam’s talk to you. He explains that with better examples and more clarity than me.
dhucerbin commented on React for Two Computers   overreacted.io/react-for-... · Posted by u/abraham
halflife · 10 months ago
Sorry, having trouble understanding the nuance of the auth example (FYI in react I have experience only in small scale projects). What’s the difference in classic client components having a root component validation auth?
dhucerbin · 10 months ago
Sure! In some methods of authentication, like OpenID, not only your client need to present some UI, but also you need to prepare some endpoints on the backend to handle full flow of authentication. You probably also need to provide some parameters to those endpoints and methods inside.

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.

dhucerbin commented on React for Two Computers   overreacted.io/react-for-... · Posted by u/abraham
halflife · 10 months ago
This is very long, I’ve skimmed over the article. In the end, what I’m trying to understand, is what server components solve? Faster performance? Serving compiled app html on refresh? Why is it so much better than the old school hydration?
dhucerbin · 10 months ago
Value proposition is “components for server”. But it’s worth to take a step back first.

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.

dhucerbin commented on Svelte 5 is not JavaScript   hodlbod.npub.pro/post/173... · Posted by u/jonstaab
skrebbel · a year ago
Mostly offtopic, but I just want to drive-by namedrop Legend State, which provides a deep reactivity state system similar to the one in SolidJS or Svelte 5, but with substantially fewer gotchas because its design makes it abundantly clear when you're working with a proxy (which tracks dependencies) and when you're working with plain data.

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.

https://legendapp.com/open-source/state/v3/

dhucerbin · a year ago
Reminds me of karet [0]. I used it with great success for making interactive visualizations. This duality of passing a value or passing a stream of values was great.

[0] https://github.com/calmm-js/karet

dhucerbin commented on HonoJS: Small, simple, and ultrafast web framework for the Edges   github.com/honojs/hono... · Posted by u/nateb2022
mansarip · 2 years ago
Recently, I've been looking for a suitable stack for another pet project. Personally my go-to stack is Remix.

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.

dhucerbin · 2 years ago
May I interest you in hwy.dev?
dhucerbin commented on Super Mario 64 on the Web   probablykam.github.io/Mar... · Posted by u/nazgulsenpai
vsnf · 2 years ago
I had forgotten how many interruptions there were to actually getting to the game. Intro cutscene, letter from Peach, prompt from Lakitu outside the castle, prompt from Bowser inside the castle, prompt from the Bombombs inside the first level...

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.

dhucerbin · 2 years ago
That's the moment where you wipe your hands and compose yourself after restart because of failed canonless!
dhucerbin commented on US lawyer who put Big Tobacco on trial takes aim at sports betting   ft.com/content/497fdb45-f... · Posted by u/donsupreme
jjice · 2 years ago
The sports betting craze is really interesting to me. I'm from upstate NY and I remember when it got legalized I didn't think much about it. Let people do what they want. I won't play because I don't gamble.

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.

dhucerbin · 2 years ago
Over the years I took part in few similar discussions. Almost every time argument against regulations was “but alcohol prohibition in USA made things worse”. I don’t have knowledge, but intuitively I’m not sure if it’s really that bulletproof argument. Have someone any thoughts? How to approach that critically?
dhucerbin commented on Open-source drawing tool – Excalidraw   github.com/excalidraw/exc... · Posted by u/dmezzetti
sarchertech · 2 years ago
I love Excalidraw before I switched over to an iPad Pro I was using it to do the illustrations for my book https://www.networksfromscratch.com/
dhucerbin · 2 years ago
What do you use now, on iPad for drawing?
dhucerbin commented on Pinball implemented using Squint, a ClojureScript dialect   squint-cljs.github.io/squ... · Posted by u/Borkdude
dhucerbin · 2 years ago
I had a lot of fun using squint with solidjs. It pairs so well with minimal, focused libraries. Maybe it doesn’t give you any superpowers but make code a little cleaner and steer you away from few traps.

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!

dhucerbin commented on Quake Brutalist Jam II   slipseer.com/index.php?re... · Posted by u/jakearmitage
bmk44 · 2 years ago
"Almost Lost" and "Campgrounds" are brilliant works of level design art. Why bother playing any other map?!

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.

dhucerbin · 2 years ago
Don’t you mix up „Almost Lost” with „Lost World”? qztourney6 is kinda linear and rail heavy. And wasn’t in standard map pool too long. But I admit, I had a lot of fun playing 2v2 there!

u/dhucerbin

KarmaCake day177May 23, 2012View Original