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

202
Visualizações
How can I pass a route with an id in a function call

I want onClick of a delete button, I would get the id of a selected item and be able to perform a delete operation with the id, but right now the value I am getting is undefined..

This is what the route looks like

 http://localhost:9000/customization/cooperations/terminal/undefined/delete

If I can get the value, then the delete operation will be successful

This is my code block

      const handleDelete = () => {
      history.push(`${match.url}/${terminalEntity.id}/delete`);
     console.warn(terminalEntity.id);
     };

Right now with this function, I can not get the value of the id, but I am getting undefined and it maps to this route indicated above.

====> http://localhost:9000/customization/cooperations/terminal/undefined/delete

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