Top
Best
New

Posted by danabramov 4/15/2025

JSX over the Wire(overreacted.io)
267 points | 178 commentspage 4
jacobobryant 4/15/2025|
The framework checklist[1] makes me think of Fulcro: https://fulcro.fulcrologic.com/. To a first approximation you could think of it like defining a GraphQL query alongside each of your UI components. When you load data for one component (e.g. a top-level page component), it combines its own query with the queries from its children UI components.

[1] https://overreacted.io/jsx-over-the-wire/#dans-async-ui-fram...

gherkinnn 4/15/2025||
There is a part of my brain that is intrigued by React Server Components. I kinda get it.

And yet, I see nothing but confusion around this topic. For two years now. I see Next.js shipping foot guns, I see docs on these rendering modes almost as long as those covering all of Django, and I see blog lengthy blog posts like this.

When the majority of problems can be solved with Django, why tie yourself in to knots like this? At what point is it worth it?

danabramov 4/15/2025|
I think the rollout is a bit messy (especially because it wasn't introduced as a new thing but kind of replaced an already highly used but different thing). There are pros and cons to that kind of rollout. The tooling is also yet to mature. And we're still figuring out how to educate people on it.

That said, I also think the basic concepts or RSC itself (not "rendering modes" which are a Next thing) are very simple and "up there" with closures, imports, async/await and structured programming in general. They deserve to be learned and broadly understood.

yawaramin 4/15/2025||
I skimmed over this and imho it would be better to cut like 30% of the exposition and split it up into a series of articles tackling each style separately. Just my 2c.
danabramov 4/15/2025|
I'm hoping someone will do something like that. I try to write with the audience of writers in mind.
grncdr 4/16/2025||
> Since XHP executes on a server that emits HTML, the most that you can do relatively seamlessly is to replace parts of an existing markup with the newly generated HTML markup from the server by updating innerHTML of some DOM node.

It’s a very long post so maybe I missed it, but does Dan ever address morphdom and its descendants? I feel like that’s a very relevant point in the design space explored in the article.

MJGrzymek 4/16/2025||
Reading the linked article https://htmx.org/essays/how-did-rest-come-to-mean-the-opposi... , does this mean Next.js is the real REST?

I still can't get over how the "API" in "REST API" apparently originally meant "a website".

_heimdall 4/16/2025||
I always come back to the idea that I want to render HTML where the state lives rather than shipping both a rendering engine and all the necessary data to a client.

In most cases that means rendering HTML on the server, where most of the data lives, and using a handful of small components in the frontend for state that never goes to the backend.

andrewstuart 4/16/2025||
IMO:

1: APIs should return JSON because endpoints do often get reused throughout an application.

2: it really is super easy to get the JSON into client side HTML with JSX

3: APIs should not return everything needed for a component, APIs should return one thing only. Makes back and front end more simple and flexible and honestly who cares about the extra network requests

alejalapeno 4/15/2025||
I've represented JSX/the component hierarchy as JSON for CMS composition of React components. If you think of props as CMS inputs and children as nesting components then all the CMS/backend has to do is return the JSON representation and the frontend only needs to loop over it with React.createElement().
valtism 4/16/2025||
Really appreciate the quality you put into expressing these things. It was nice just to see a well laid-out justification of how trying to tie a frontend to a backend can get messy quickly. I'm definitely going to remember the "ungrounded abstraction" as a useful concept here.
cstew913 4/15/2025|
It reminds me of when I sent HTML back from my Java Servlets.

It's exciting to see server side rendering come back around.

More comments...