Skip to content

List Vite at the same level as SSR frameworks as a way to start a new React project #5797

@matijaSos

Description

In the "Start a New React Project" section of the docs, Vite (and Parcel) are currently mentioned at the bottom of a collapsible toggle "Can I use React without a framework", hidden by default. They are listed as an option only if your app has "unusual" constraints (no further explanation or example of what that could be).

As Dan recently explained, the main reason behind this is that SSR frameworks offer the optionality of, well, SSR. The argument is that although you may not need it now, you might in the future, so you should still start with an SSR framework. But it isn't a free lunch - this way, you get immediately locked into a specific framework that makes a lot of other decisions for you that you haven't even had a chance to evaluate yet.

The recent article "New React docs pretend SPAs don't exist anymore" caused a lot of reactions, and many developers expressed their opinion on Reddit (300+ comments) and HackerNews (200+ comments).

This was the top comment in the Reddit thread:
Screenshot 2023-03-22 at 12 52 27

My point is not at all that an SSR framework is a bad/wrong choice for any kind of app, and I believe it is a totally valid recommendation, even for SPAs. But it is evident that developers still widely recognize other solutions as equally good for particular use cases. Also, with the current setup, beginners in React are now forced to immediately choose between three frameworks which all add a lot on the top of React. It is almost an impossible task for a beginner (in the end, 80% will choose Next simply because it is listed on top).

Vite should be listed next to Next, Remix, and Gatsby. I would clearly depict the pros and cons and possible pitfalls.

I understand that the aim here was to protect developers from using react in a "wrong" way, but, at the end of the day, React is a library, not a framework, and there are a lot of benefits to it. The docs should respect and objectively reflect what the developer community identified as sensible ways to use it, not the other way around.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions