#I have an issue with react-router-dom/ @reach/react on scrimbs or so?

8 messages · Page 1 of 1 (latest)

stuck solstice
#

Hi! I don't know about reach router but I think you have to provide a url path to the navigate function and not the file path. If you can provide a screenshot of the app component you should probably have something like:
<Questions path="questions" />

so the navigate function should contain something like:

navigate("/question")

I don't know if it will solve the error though

random cloak
#

Can u provide ur App.js & question.js screenshot?

#

Btw there will be no '.' while giving route

marsh copper
#

Are you sure you want to use reach router? If I recall correctly Bob teaches react router not reach router

random cloak
marsh copper
#

All good just double check with the routing section on the react course im 99.9% sure he uses react router

#

and react-router does have a useNavigate or useNavigation hook (cant remember the name of the hook lol)