Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
A tutorial-style guide for building React apps with Next.js, covering SSR, routing, styling, and deployment.
LearnNextjs is a tutorial-style starter guide that teaches you how to build React applications with Next.js, covering server-side rendering, file-based routing, API routes, and deployment.
LearnNextjs is a step-by-step tutorial that walks through creating a full-stack React app with the Next.js framework. It takes a beginner through installing Node.js, creating a project with yarn create next-app --typescript, adding dev/build/start scripts, and building pages under the /pages directory. The guide explains Next.js conventions such as file-based routing, where the filename determines the URL, and dynamic routes using [param].jsx and catch-all routes with [...param].jsx. It runs on Node.js, and the finished app can be deployed to any platform that supports Node.js.
/pages folder; nested folders and [brackets] in filenames map to dynamic sections of the URL./pages/api directory (the guide lists API routes as a highlight)._app.jsx, CSS Modules with the .module.css naming convention, and theme-ui via a JSX pragma for the sx prop.useRouter hook and router.push() enable client-side navigation, preserving the single-page-app behavior.next.config.js can be customized with plugins and webpack configuration, including adding a bundle analyzer./notes, and an individual note at /notes/:id using dynamic route files.Link component from next/link to move between pages without a full server reload.sx prop, and import CSS Modules to scope component styles.next.config.js to add webpack plugins like webpack-bundle-analyzer and use community plugins like next-offline.The tutorial follows a build-along format: first install Node.js and set up the project with yarn create next-app, then add npm scripts for dev, build, and start. From there you create pages under /pages, link them with next/link, and add dynamic routes using bracket syntax. Finally, the guide covers styling with theme-ui, customizing the config file, and composing plugins.
It covers installing Next.js, creating pages and dynamic routes, linking pages, styling with CSS Modules and theme-ui, customizing next.config.js, and compares Next.js to Gatsby and Create React App.
Yes. Next.js is a full-stack framework and by default must be hosted on a platform that supports Node.js, as stated in the guide.
Create a file with square brackets, e.g. pages/notes/[id].jsx, and the id value will be available via router.query.id. For catch-all routes, use [...param].jsx.
It can generate a static site, but the guide says that is not its main use case; Gatsby is presented as a stronger choice for static-only projects.
