Adopt a Pet! Off-Platform Practice Project

First time posting on the forums hope my link works!

Note: If your stuck try updating your package.json file using the console/terminal
Ex: npm install extension@latest
Replace extension with the extension you want to update in your package.json file.

Hope it helps :wink:


Best regards,

Lawrence

Hey all,
I got fairly frustrated with this course being for react router 5, so I did the final project with react router 6. Code, brief description of what is different, and link to sandbox are here if of interest: GitHub - ccozens/adopt-a-pet-with-react-router-6: Codeacademy react router final project with React Router 6

Chris

2 Likes

Thank you! Had this same issue, I guess once you realize “search” could be misinterpreted as a “:type” it makes sense but it really confused me bc I didn’t understand why it wasn’t working.

Nice! im going to convert to 6 now that I finished. Yeah I noticed the same thing and did change the home to use the instance of Pet component. All I did was pass it a prop animal={animal} and then change the img in pet to the stock photo!

Great project learned a lot about react-router. Done mine…

GitHub Repo: GitHub - JohnKennethEze/adopt-a-pet-starter

Thank you…!!

Thank you Chris!

I was unsure to do this project in v6 or not but your link with the readme is excellent. I will be using it post haste. Your added comments and steps are much apricated.

Ted

Man, I was stuck on that last part for quite some time. I was using the useNavigate hook but I did navigate(-1). I saw that you did navigate(-2) and that finally worked for me so thanks lol.

I’m guessing it’s because going back only one page takes you back to the PetDetailsPage page which automatically redirects you to the PetDetailsNotFound page so you need to go back twice?