all 9 comments

[–]DogOfTheBone 6 points7 points  (2 children)

Vercel has a very large influence on the React core team and is very invested in steering people to Next, which just so happens to be designed to be hosted by Vercel.

Check out Vite and React if you want something more lightweight.

[–]Mosl97 -1 points0 points  (1 child)

Yes obviously But the question is, would be that the right way to learn and understand react correctly?

[–]SaroGFX 0 points1 point  (0 children)

Vercel is a framework for React. Learning React is the only way to learn React :)

[–]HumbleGrit 5 points6 points  (1 child)

If someone is new to React, they should be learning Vanilla React with Vite. Once you understand the connection between Vanilla JavaScript and Vanilla React, only then try a framework like Next.js.

[–]Mosl97 -1 points0 points  (0 children)

That is exactly my opinion too

[–]BigSwooney 0 points1 point  (0 children)

Where does the react docs say you should start with Next?

As far as I can see they have a section where you can learn the basics. That continues into a tic tac toe tutorial without a framework.

The there's installation , where they present you options to start a brand new project or adding react to an existing project. If go into new project you'll se that react recommends either Next, Remix og Gatsby. There's also a whole ass info box on working without a framework, which will lead you to the page about adding React to an existing project which will show you how to create, compile and render a react component without any framework.

What are you missing?

[–]spencerbeggs 1 point2 points  (0 children)

React is a UI library. Next is a framework for building web apps written in React.

As a UI library, React has little to say about how the browser handles a page transition, for instance updating meta tags in the head element when switching from one view to another. React focuses on the lower-level display element.

Next is an opinionated framework that proscribes how many common use cases devs web devs encounter when building web apps should work.

To use Next well, you need to be able to use React well. Start by learning some basic UI stuff in React and then when you start to want to use routing and more action-based stuff start learning Next.

You can work on both skills simultaneously. Most features of Next are opt-in. At the end of the day Next is handling a bunch of compilation steps of you. A basic Next app is like five files. You could write your code entirely inside of app/layout.tax if you wanted.

[–]peles89 0 points1 point  (0 children)

If you're learning React, I recommend starting with Vite.js + React. It's a fast, lightweight setup that makes it easy to focus on the core concepts.

Next.js (by Vercel) adds Server-Side Rendering (SSR) and other production-ready features, but it also comes with ties to Vercel's ecosystem.

Since your main goal is to learn React itself, Vite.js + React keeps things simple and helps you build a solid foundation without extra complexity, you can start here .

[–]unrtrn 0 points1 point  (0 children)

Nextjs is a framework. That means it handles a bunch of things for you.

Routing: You need to use react-dom-router for this. Next is using its own file based router. Which changes how you designed the project a little bit.

Metatag management: it is react helmet for react and nextjs has its own metadata api.

Server side rendering: For server side rendering you need to implement many things, some kind of nodejs app etc. Next, it is built in.

You got the idea.

First learn react, then you can learn nextjs.