Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

215
Visualizações
Why can't I navigate to the detail page when I'm using a link component in react

In react, I want to use this code to link the detail page in my main list page. This is the react code:

{
      title: 'more',
      render: (val, row) => {
            return (<Link to={`/zhuolian/activity/detail/${row.id}`}>more...</Link>);
      },
    },

and this is my route config:

{
        path: '/zhuolian',
        name: 'zhuolian',
        icon: 'contacts',
        routes:[
          {
            path: '/zhuolian/activity',
            name: 'activity',
            hideChildrenInMenu: true,
            component: './xRepo/Activity',
            routes:[
              {
                path: '/zhuolian/activity/detail/:activityId',
                name: 'detail',
                component: './xRepo/Activity/detail',
              },
            ]
          },
          
        ]
      },

I am now using the router version "react-router-dom": "^4.3.1", and when I click on more, the log shows this warning:

index.js:1 Warning: Hash history cannot PUSH the same path; a new entry will not be added to the history stack

and it did not navigate to the detail page. I have tried to add the replace in the link component but it still did not work. Am I missing something? What should I do to make it link to another detail page when I click more?

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda