Questions tagged [dynamic-routing]

89 questions
28
votes
2 answers

Advantages of dynamic vs static routing in React

I'm reading about static vs dynamic routing in React Router, and I'm struggling to identify the advantages of the latter (and why v4 chose to go with it). I can see the advantage of listing out all the routes for an application (static), as well as…
Andre
  • 1,481
  • 1
  • 17
  • 38
9
votes
1 answer

Dynamically add child routes in Vuejs

According to this official example, we have the ability to add nested/children routes in vuejs. But I cannot find any help/docs around a way to add these children routes dynamically. e.g only add child routes when Parent route is visited. Currently…
Nexus23
  • 5,607
  • 8
  • 43
  • 64
5
votes
1 answer

Nextjs assets 404 Not Found when using dynamic rouitng while ssr

I had a static folder with an older version of nextjs. I updated my nextjs to use public folder. "next": "^9.4.0", "react": "^16.13.1", "react-dom": "^16.13.1", this is my nextjs config: const withPlugins = require('next-compose-plugins'); const…
Afsanefda
  • 2,141
  • 1
  • 26
  • 50
4
votes
1 answer

Nuxt generate static site with a fallback file for all dynamic routes

I already searched the whole internet for an answer to my question. No luck so far. What I want to achieve: I have a Nuxt application running in Universal mode. It is something like a small social network where users can create their own profiles…
Moritz Laube
  • 219
  • 2
  • 9
3
votes
1 answer

Gatsby dynamic routing breaks upon gh-pages deploy

I deployed my first Gatsby project to github pages: repo: https://github.com/michal-kurz/stfuandclick gh-pages: https://michal-kurz.github.io/stfuandclick/app/ (generated from gh-pages branch) It has one page, src/pages/app.tsx, which uses use Reach…
3
votes
0 answers

Nuxtjs dynamic routes not accepting payload when "full static"

When I run nuxt generate with target: "static" in my nuxt.config.js, my dynamically-created routes do not accept their payload, which they get like so: ****nuxt.config.js**** generate: { routes() { return axios …
sford4
  • 31
  • 2
3
votes
1 answer

NextJs and dynamic routes - how to handle the empty parameter scenario?

I'm trying to retrieve the url parameter without using query strings, for example, http://localhost:3000/test/1, this is what I have so far: Dir structure test - [pageNumber].jsx index.jsx import React from 'react'; import { useRouter } from…
darksoulsong
  • 9,541
  • 11
  • 36
  • 70
3
votes
3 answers

How to achieve n levels of nested dynamic routes in Vue.js?

I want to achieve n levels of dynamic nested routes in Vue.js, where n is unknown to me. for eg - abc.com/ctx-path/component/1/2/...../n where 1,2,...n are the levels How can I achieve this with Vue-router?
3
votes
1 answer

How to do canary releases and dynamic routing with Netflix Zuul?

We faced with the problem that we need to do such thing as dynamic routing and canary releases. So, for example, we deploy microservice microservice-1. Then, when someone finished a big feature we want to deploy it as a microservice…
2
votes
0 answers

Next.js dynamic routes using a different URL

I am currently updating a React project to use Next.js. I've stumbled on a slight issue with Dynamic Routing which so far I can't find any solutions online. I have a number of info pages that use the same component and display different content…
j.grima
  • 1,560
  • 3
  • 19
  • 41
2
votes
2 answers

nextJS SSR useRouter() does not work when refresh page

I am using nextJS SSR in my project. Now when I try to use the following code to get page parameters then it shows undefined. function About() { const router = useRouter(); const { plan_id } = router.query; console.log(plan_id) } export…
2
votes
1 answer

Dynamic Subdomain Routing With NextJS

How can the Dynamic Sub domain routing feature be implementing in NextJS? Example: If a user comes with username abc in site xyz then he can access his site on abc.xyz.com Also, if the user have abc.com domain then he can point abc.com to…
Ajay
  • 121
  • 1
  • 10
2
votes
0 answers

How to use DataTokens in ASP.NET Core 3.1 when performing dynamic routing?

I am using the class DynamicRouteValueTransformer built into ASP.NET Core 3.1 to perform dynamic controller routing as demonstrated in the code below. public class UrlRouteTransformer : DynamicRouteValueTransformer { public override…
dezzy
  • 339
  • 4
  • 17
2
votes
1 answer

Dynamic routing in ASP.NET Core 3.1 when part of the url is already another route

I'm trying to use DynamicRouteValueTransformer with IEndpointRouteBuilder.MapDynamicControllerRoute to dynamically map new routes. This is for pages that are added while the application is running. I'm…
2
votes
0 answers

Build Next.js multi-language application with client-side routing

I'm currently working in a multi-language application with Next.js that I intend to host in an S3 bucket. In this site, I need to maintain an application state across routes, by doing client-side routing from one route to another. Since I need to…
1
2 3 4 5 6