Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
Can you create a default route in Next.js

Is it were possible to have default routes in Next.js so all routes or a whitelist of routes will all go to a specific page.

For my project the idea is to use Next.js to build the marketing website, sign up and sign in process, and then to have a Next.js page that would boot up an SPA (probably using create-react-app and react-router) so that any route which isn't a Next.js page would assume that instead its a route in the SPA and would therefore direct to that page which would boot up the SPA

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

One way that seems to work is to create a custom 404 page. https://nextjs.org/docs/advanced-features/custom-error-page

Every route that is not a recognised next.js route will call this page, but will not redirect (change the browser URL) which is exactly what's wanted when booting up an SPA.

about 4 years ago · Santiago Gelvez Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!