Post

it’s not some theoretical thing, it’s what we were seeing during years of CRA popularity. people complain how confusing it is to add a router because you have to turn your existing template inside-out. most beginners just copy pasted <Router> definitions they didn’t understand

the proposed approach here isn’t something 1000% different. you still start with a “single page”. you can do your calculator or todomvc or whatnot there. but *when* you need to add another page, you don’t need to turn your code inside out. you just create a file. same with loading data etc

Well, first you have to understand some very obtuse file naming conventions. App router is not simple. I have to look up the docs every time I use it. Sure it scales/has a lot of features but there’s something to be said for starting simple and actually learning how all the pieces fit together IMO.

it’s not obtuse if it’s just home/about/etc. and then something like [id] seems fine to me. i’m not pushing for Next specially. just anything that lets you create files and link between them

On original topic, is it asking for the world to just mention a bare bones Vite setup is an option in the docs? I feel like the counter argument I’m perceiving here that React is completely useless without a larger framework and that frameworks are zero cost abstractions is kinda weird

there’s a mention that it’s an option, just not a recommended one. i’m finding it difficult to imagine it becoming a recommended one

Recommended for what? Shipping a production grade app? Or learning? I feel like Vite and its CLI is perfectly fine to start with to "learn" react, and deserves a louder shout out as a safe place to sandbox with. I totally get pushing a framework to build apps with.

react router *is* vite these days, no? we just need to rename “remix” to “react router” on that page, no need for new templates

This. It can literally be this simple. If Vite alone isn't a good enough recommendation, then by all means, pair with some routers. My social feeds, community and DMs are literally full of people building production grade web apps (some very prominent enterprise companies) using only Vite + Router.

Exactly. What confuses me with the stance that starting with just vite is not recommended is that this is literally how 80% of all perfectly fine production grade apps I’ve seen is being built today, with 20% dabbling with server-side. It feels disconnected from at least my reality.

If the recommended answer to ”I have a python backend and need to serve a frontend” is ”you need to spin up an additional js compatible backend service”, I feel like React has lost the plot.

Tbf, backend for frontend is quite viable and very helpful for having stuff like trpc or server components handle isomorpic types across the server boundary. But if that tradeoff doesn't make sense, tanstack query and openapi-ts are quite a good combination as well)

Yeah, that's kinda a major concern with the stances that Ricky has had about. It's assume that most people can use React as a full stack framework and although it's powerful, fe/be splits have been my reality for my entire career and even a BFF can be shot down by managers

To give a example, the Dublin market seems to be set up where be devs outnumber the frontenders, the be folks are mostly python and java, they end up in management more often, and are generally universally shocked by all the churn with fe tech. Vite SPA's and query just work by 5pm there.

Most large successful enterprises are now allowing JS on servers at all. They have backends and API written in different languages by different teams. It's ridiculous to think that's going to change any time soon or even that it should. Full-Stack JS represents such a small part of reality.

3 reposts24 likes