Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

91
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!