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

92
Visualizações
How to run the function when the specified url is entered reactjs

I have two urls in my project. the first one: http://localhost:3000/?/#chain=Matic, and the other one: http://localhost:3000/?/#chain=Bsc. I want the function I created to run when entered with this url. How can I do that?

For example, when this http://localhost:3000/?/#chain=Matic address is entered, I want the relevant function to be loaded automatically after the page is loaded. Is there a way to do this?

Thank you very much.

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You'd want to amend the URL so that we're pulling from the get parameters. Then we can look for the variable when the page first loads and run logic depending on what the value is:

Here's a complete example: https://codesandbox.io/s/resolve-url-parameter-2odpc

about 4 years ago · Juan Pablo Isaza Relatório
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