Hacker News new | ask | show | jobs
by square_usual 1063 days ago
React doesn't have a "relatively small surface" any more, because even the React team doesn't recommend that you use "just" React. It's all frameworks on top of React like Next or Remix, and those are more complex, have many involved concepts and come with footguns. I have seen many, many sites switch to Next and completely bungle it, making the user experience worse than it was before the change.

(Of course, even React itself has gotten fairly complex with Hooks, Suspense and the dreaded Server Components.)

2 comments

> I have seen many, many sites switch to Next and completely bungle it, making the user experience worse than it was before the change.

What are some specific sites you've seen that adopted react and ended up worse as a result of it?

> doesn't have a "relatively small surface" any more, because even the React team doesn't recommend that you use "just" React

Isn't this evidence of it having a relatively small surface area that frameworks and other tools can build on top of, much like html, css etc?

> Isn't this evidence of it having a relatively small surface area that frameworks and other tools can build on top of, much like html, css etc?

No? You can build on top of a large surface area, too? Of course, the funny thing is, even if you are right and React has a "relatively small surface area" (relative being the operative word,) what good is it when the creators of the framework say that you shouldn't use that surface area directly?

> What are some specific sites you've seen that adopted react and ended up worse as a result of it?

I don't think you're arguing in very good faith, but one recent example is the Indian grocery delivery service bigbasket. They switched from mostly-server-rendered to Next, and the new version was downright horrid for a while, and is only barely usable now. The most cruel part of the joke is that the next.js version is currently only shown to logged in users, so you can blissfully shop for a while, get to the cart and then be hit with the awful new UI.

Another example is new reddit
You can still use just React. No one is forcing you to use Next or Remix
No one is forcing you, but the React docs say "If you want to build a new app or a new website fully with React, we recommend picking one of the React-powered frameworks popular in the community. Frameworks provide features that most apps and sites eventually need, including routing, data fetching, and generating HTML."

So, it going to be difficult to choose pure React with that kind of statement.

Even using React v5 without a state library for a large app was bonkers back then, regardless of what the library maintainers said.

At some point you will have some state that transcends the UI and trying to shove it into React UI component does not make sense.

How is it difficult? Tons of companies have profitable UIs that aren't using a meta framework. Just because the React team says "we recommend you do X" doesn't mean you have to do X. If they said, "you must do X" then yea, you should do X