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

414
Views
The code of the component is unreachable although is getting the dynamic route param

Hi people ๐Ÿ™‚ I am doing a project with React + JS and I have installed wouter and I am trying to make my app working with a dynamic params in the route. That means: if I go to "/gif/panda" that it will render the gifs of pandas. However, although I have been several hours researching, I dont know what happens. As you can see in console, the "/gif/:keyword/", I mean, the keyword is received by the component List of Gifs, as it returns the phrase "Hola Panda". Panda was the keyword. But I dont know why the return code of the component is unreacheable and, therefore, the app crashes. Any idea? Thanks.

enter image description here enter image description here enter image description here

about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

You must put JSX code into brackets on return statement.(in ListofGifs component) Since there is no brackets your function returns nothing. If you look carefully you can see that the code after return statement is pale which means it just doesn't work. I added image below. I hope it solves problem.

add brackets

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!