Next.js
A React web framework with server components, caching and deployment on your own server.
FrontendUsing since 2018 · Featured project: Budzowska Fiutowski i Partnerzy
- Category
- Frontend
- Using since
- 2018
- Featured project
- Budzowska Fiutowski i Partnerzy
In practice
Next.js is my main choice and the technology I specialise in: I am an expert in it. I pick it when a site has to be fast, visible in Google and do more than show content. I built The Travelling Cows and Gaia Lens with it. I skip it for a one-afternoon site.
What is Next.js?
Next.js is a web application framework built on React. Routes follow the folder structure, and pages and layouts in the App Router are Server Components by default. Data is fetched and rendered on the server, so less JavaScript reaches the browser.
One app can mix pages prepared ahead of time with parts computed per request. The Cache Components option, which you switch on in the config, builds a static shell of the page, and the dynamic parts stream in when ready.
- Components
- Server by default in the App Router
- Deployment
- Node.js server, Docker container or static export
How I work with Next.js
I start by asking what on the site really has to be dynamic, because the whole architecture follows from the answer. I want the rest ready before the first request arrives.
Server and browser
Data fetching and pages stay on the server, and client components get only what reacts to a click or uses a browser API. That is how ENATIV Portfolio is split: pages on the server, interactions on the client.
Caching and prebuilding
What does not change, I generate statically and store with the
use cachedirective. The pages of ENATIV Portfolio are produced at build time, and the language versions come out ofgenerateStaticParams.Running it
I package the app into a Docker container and run it on my own VPS. At Budzowska Fiutowski i Partnerzy that goes through Coolify, with health checks and CI/CD, so I do not depend on a single hosting platform.
When it fits, and when it doesn't
I choose it where a site combines content with application logic.
A good fit when
- A company or law-firm site with an editor panel and two language versions.
- A booking service with a client account and integrations with outside systems.
- A headless store whose frontend talks to Shopify or Medusa.
- An app with a rich interface where some views have to show up in search.
Not a fit when
- A site the owner wants to assemble alone from ready blocks, with no developer.
- A team that cannot maintain an app in TypeScript and Node.js.
- A one-afternoon site with no routing, caching or language versions.
- A mobile app, where React Native fits better.
The comparison with WordPress, including why I choose something else today, sits in the entry on WordPress.
Frequently asked questions
next-intl library. ENATIV Portfolio works this way, and I set up Polish and English in a similar way at Budzowska Fiutowski i Partnerzy. Polish URLs can use native words instead of English route names.Planning a site with app logic?
Describe in a few sentences what the site has to do besides show content: bookings, accounts, several languages. In return you get my proposed architecture and a note on what I would not build in Next.js for that project.