I am starting a project where I decided to use Next.js. But my manager doesn't want the app to be in SSR, as it needs a Node server. He wants it to be only SPA.
Now I can use create-react-app
and create the app with React, but I was thinking of taking advantage of the Next.js routing and other built-in configs.
As I've seen in Nuxt.js, there is a way of using 'universal'
or 'spa'
mode, I am searching if there is any way to make 'spa'
in Next.js.
Yes it's possible. But that's not what it was built for and you're going to have a hard time keeping it a SPA. The Next routing and other built-in configs are specifically for SSR and creeping towards static site generation. create-react-app
and things like React Router were built specifically for SPAs (though they're moving towards better SSR).
So if your boss wants a SPA, use the proper tool for it - today, that's CRA. You'll build it faster and meet the project requirements set forth by your boss. When the boss is ready for a SSR, consider Next. When the boss wants a static site built using React, consider Next or Gatsby.