Live data from Hacker News

New React docs pretend SPAs don't exist anymore

wasp-lang.dev

181–190 of 225 posts

Re: New React docs pretend SPAs don't exist anymore

#181
post #42

Earlier quoted context omitted.

The part about this that bothers me is it not being documented well is in vercels financial interest

This is what has made me hesitant to really invest deeply in Next.js. It's just too familiar where some open source project starts. Later it attempts to monetize. Some feature in open source makes it so new monetization thing (usually cloud functionality) isn't needed, so those feature(s) get downplayed, neglected, and eventually deprecated, often with self-fulfilled prophecy/declaration of "nobody is using those" (b…

We've made quite a few improvements to the static export with the new App Router, including support Server Components, Route Handlers, i18n routes, and more. Definitely still being invested in. My comment about documentation debt is that the entire information architecture of the Next.js docs needed some work. It's being fixed and will be stable soon.

You can read more about how to use Image Optimization with a static export in the new docs: https://beta.nextjs.org/docs/configuring/static-export. There's a full example there with Cloudinary, but you could use any service you want.

Re: New React docs pretend SPAs don't exist anymore

#182
post #141

Earlier quoted context omitted.

What part of my comment suggests that I think people are stupid? --- Tools can solve important problems "and" increase the complexity to point where they create other problems which makes the trade-off untenable.

> What part of my comment suggests that I think people are stupid? This part: > What happened to KISS?

https://en.wikipedia.org/wiki/KISS_principle

Right on that page is an example of "Keep it Simple" without the "Stupid". A charitable reading of parent's comment wouldn't have thought the commenter was labeling anyone stupid with the appeal to keep things simple.

Re: New React docs pretend SPAs don't exist anymore

#183

Earlier quoted context omitted.

> What part of my comment suggests that I think people are stupid? This part: > What happened to KISS?

https://en.wikipedia.org/wiki/KISS_principle Right on that page is an example of "Keep it Simple" without the "Stupid". A charitable reading of parent's comment wouldn't have thought the commenter was labeling anyone stupid with the appeal to keep things simple.

You can deliberately exclude the word "Stupid" from the expression, but that doesn't change what is being said.

> Whatever happened to KIS(S)?

Interesting question, I wonder how the entire ecosystem forgot this one simple trick? What is it about their brains that causes them to create all these solutions that are apparently worse than the problem?

Re: New React docs pretend SPAs don't exist anymore

#184
post #175

Earlier quoted context omitted.

cant agree more, vercel likes ssr,and it now owns nextjs and svelte,then it forces ssr on the community,it is basically leveraging open source for its own business needs solely, which will not last long if they keep doing this down the road. disappointed.

You can use Next.js in SPA mode – you don't have to use SSR. Here are the current docs ( https://nextjs.org/docs/advanced-features/static-html-export ) and we're working on an improved version for the new App Router ( https://beta.nextjs.org/docs/configuring/static-export ) based on community feedback. With this export, can you deploy anywhere you prefer.

this is still the ssr-first-but-will-do-it-all, I read the docs along with svletekit(which by the way, is the same tone, saying sveltekit does both SSR and CSR).

it is NOT, I do not need wade through all those unnecessary SSR code and doc and steps and some second-class-citizen configurations to figure out how to get a CSR out of it. CSR users are not that dumb.

It seems to me Vercel is the only one pushing for SSR-for-everything, I switched from svelte to React for exactly that reason, now React/Next.js is selling the same thing, I'm back to Vue. Please do not ever buy-or-influence Vuejs for SSR-first-and-does-everything-you-need, at least leave one untouched for us who cares nothing about SEOs.

Re: New React docs pretend SPAs don't exist anymore

#185

Earlier quoted context omitted.

Vercel's next.js and sveltekit are both SSR first because that's its business needs, which has nothing to do with mine(CSR only case), and Vercel is actively pushing the SSR-can-do-it-all in the open source space, I feel it is very much short-sighted. Just use vuejs which is the only one truly never forces SSR on you if you do not want to have anything to do with it.

Speaking as an engineering manager, vercel’s approach seems to cater to the last market where overengineering and complexity were status symbols that middle management was happy to pay for. When the headcount was free, there weren’t many questions from upper management why basic UIs required so much heavy lifting by (overly) experienced engineers. In the new market, there will be much more scrutiny on costs and the c…

Vercel is I think going to have a great time of it. Setting up code pipelines, and the devops time needed for it, compared to just having it deploy from github, and having sane logging?

Only people who haven't had to set all this up themselves think Vercel isn't amazing.

It is handling a LOT of devops heavy lifting for you.

Re: New React docs pretend SPAs don't exist anymore

#186

Earlier quoted context omitted.

> and no one can delete anything because you have no idea what it'll break. This is a problem with GraphQL, but you can monitor if anyone is requesting that data. Major benefit with GraphQL is you can ask for the data you need and just the data you need. So you don't have 30 different API endpoints that really return the same data, just smaller chucks. Or maybe you just need the IDs... etc. GraphQL is also efficient…

> Major benefit with GraphQL is you can ask for the data you need and just the data you need. So you don't have 30 different API endpoints that really return the same data, just smaller chucks. Or maybe you just need the IDs... etc. Most sane REST-like implementations also support this, typically with query string modifiers like a "fields" param or similar. A lot of them also support deep relationships this way too.…

Well, yes, but not really. With GraphQL you can have one user:

- Request the users, their IDs, and emails, and their post ids

Or:

- Request the user, tons of profile information about them, and the posts with all the info about the posts

You'd have to implement all this filter stuff for REST - and at this point if you have a bunch of different queries, yeah GraphQL makes sense.

Re: New React docs pretend SPAs don't exist anymore

#187

It sometimes seems like every web framework is run by people who see a minor problem and completely change their project to solve it. Flash back to 2014 when Rails made Turbolinks on by default, and broke everyone's SPAs. Flash back to Angular rewriting in Dart because "it's the future" (it wasn't). Flash back to React replacing the perfectly-fine functional components with hooks (because Vue did it). And now React i…

> Flash back to React replacing the perfectly-fine functional components with hooks (because Vue did it). I think the timeline went wrong. React did it first, vue did it latter.

and also I think they meant class-based components -> functional components enabled by hooks

Re: New React docs pretend SPAs don't exist anymore

#188

Starting a "new react project" should be basically creating an HTML file, and adding a script tag linking to React the JS library. Why are these developers always trying to obfuscate everything with tons and tons of layers of indirection all the time? You don't need to "bundle" anything and certainly not use some server just to add Javascript to a page (unless it's a matter of CSP of course) and you should certainly…

You can actually still do this, and it is kind of a shame it's not documented on react.dev You need to pull in react, plus Babel standalone, and then you can use tags, which means you can bootstrap react components onto your page. But you are going to be basically running a compiler in your user's web browser. That's fine if you want to run that way, but Babel has docs that explain why you probably shouldn't ( https:…

Building up my initial knowledge like you describe was the only way I could generate the enthusiasm for working on top of so many layers of abstraction.

Re: New React docs pretend SPAs don't exist anymore

#189
post #154

Earlier quoted context omitted.

SPAs are faster than SSR because you can choose whether to incur network latency or not. For example, let’s consider a site with two pages. In the SSR case, if I click the link to page 2, then I have to wait a whole network roundtrip for the page to appear. In the SPA case you can decide when you want to load the content for page 2: with page 1 (if it’s a small amount of content), if the user scrolls to a certain poi…

Nope, you do a bit of DHTML to update the only section that matters.

Isn’t DHTML just 00s speak for SPA? Not much difference between an accordion and react router, except the history API.

Re: New React docs pretend SPAs don't exist anymore

#190
post #96

Does anyone else feel that the complexity of the full-stack frameworks is getting untenable? 1. There is a significant gap between dev and production environments. (See #2 why this is critical) 2. The production build times are super high 3. ES modules are great, but the JS ecosystem being a bundle of small libraries, getting them all to play nice is hard. 4. I occasionally get X is included twice errors that are pai…

What about CMS? Which CMS can you use with it?
Post reply on HN