Replies: 2 comments 2 replies
-
Hi, in this project, I use a useParams hook, useParam to access and use params inside the component from the URL: quick reference here: https://www.geeksforgeeks.org/reactjs-useparams-hook/. My route to a single country is "<Route path="/:name" element={} />", With the useParams you can retrieve the URL and URL contains the name. This ":name" path is created when you click the single country link on the main page and the href of this link is " to={ |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hello, I'm working on this same project and I'm encountering issues. Dunno if you can help out.
I was wondering how you were able to render the data for each country. I have created a route for individual country details but don't know how to render the data of a specific country on that route or if I should filter the country. I'm not working with the API though, I have the json data being exported from another file. I would really appreciate if you could help me with this 😅
Beta Was this translation helpful? Give feedback.
All reactions