Using Next.js to create a React application
You have looked at the basics of SSR with React, and you can use the project we created as a starting point for a real app. However, you may think that there is too much boilerplate and that you are required to know about too many different tools to run a simple universal application with React. This is a common feeling called JavaScript fatigue, as described in the introduction to this book.
Luckily, Meta developers and other companies in the React community are working very hard to improve the DX and make the lives of developers easier. You might have used create-react-app
at this point to try out the examples in the previous chapters, and you should understand how it makes it very simple to create React applications without requiring developers to learn about many technologies and tools.
Now, create-react-app
does not support SSR yet, but there’s a company called Vercel that has created a tool called Next.js, which makes...