How to enable react client side routing with nextjs static export SPA? #67512
Unanswered
mehran63
asked this question in
App Router
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have built a single-page app using Nextjs and it is exported as a simple static page which means no server-side rendering or Node.js backend, so everything runs on the client side as soon as the single-page app is downloaded.
Currently, I load different client-side panels (kind of page) using query-string like redirect from acme.com/page=x to acme.com/page=y and the redirect is handled all client side.
I want to make it proper routing, i.e. redirect from acme.com/x to acme.com/y but without any page load from serverside, all handled client-side, I am thinking about using react-router-dom (https://reactrouter.com/en/main/start/overview) but no sure if it could be used inside a next.js app and if it is the best option.
Beta Was this translation helpful? Give feedback.
All reactions