4 ms·
You can still do client-only routing (it was mentioned in the tweet linked above). It can be deployed anywhere that takes HTML/CSS/JS files.
by leerob 4y ago
You can still do client-only routing (it was mentioned in the tweet linked above). It can be deployed anywhere that takes HTML/CSS/JS files.
- re-thc 4y agoDan's gist clearly states you need to do rewrites yourself to make it work compared to traditional client side routed apps. If you have rewrites it is not anywhere that purely takes HTML/CSS/JS.
- cbovis 4y agoDans gist is referring to needing a routing layer to map something like `/blog/my-latest-article` to `/blog/[article].html`. This is the same of any non-React SPA. If I have `pages/blog/index.tsx` in my NextJS app this will get output to `blog.html` and can be deployed like a static site without further top-level routing.
- re-thc 4y agoMy original comment was specifically in reference to dynamic routes. You're referring to static routes. This is not the same as any non-React or non-Next SPA either way. A lot of them have SPA support i.e. route anything to index if there is no match. They may not have random rewrite support though.