Open tylermcginnis opened 4 years ago
Hello @tylermcginnis , There is a typo in :
The most important takeaway from those definitions is to use url for creating nested Routes and path for nested Link.
must be :
The most important takeaway from those definitions is to use url for creating nested Links and path for nested Routes.
title: Codepen exercises issue: All profile images from Twitter are broken. Must fix those links.
title: Codepen exercises issue: All profile images from Twitter are broken. Must fix those links.
Which ones specifically? I'm not seeing any. @dekisr
Which ones specifically? I'm not seeing any. @dekisr
Oh, sorry. Here are the links. (App preview / Starter code)
@dekisr Thank you!
title: Nested Route? (Question) / Project - Hash History Basketball League
issue: Looks like we are building a nested route, so should we use path
instead url
on Sidebar
and Players
components?
With url
if we try to access with a slash at the end, the Sidebar
is adding an extra slash to the links.
Examples:
https://basketball-v5.ui.dev/players/
https://basketball-v5.ui.dev/players/?teamId=koalas
Ouch, sorry, you already explained in the follow lessons. 🤐
Title: Introduction Issue: The link to this thread is broken.
current: https://github.com/uidotdev/react-router-v5-course-old/issues/1 correct: https://github.com/uidotdev/react-router-v5-course/issues/1
Title: Why React Router Issue: Missing 'r'
It’s convention to rename BrowserRoute to Router when you import it. We’ll stick to that pattern in this course.
Corrected:
It’s convention to rename BrowserRouter to Router when you import it. We’ll stick to that pattern in this course.
Also, the code example immediately following that still uses BrowserRouter
instead of the aliased Router
.
Title: Why React Router
Issue: The messages component only appears as <Messages >
instead of the self-closed <Messages />
On the project, if you visit routes that end with a slash (like https://basketball-v5.ui.dev/bulls/articles/
or https://basketball-v5.ui.dev/players/
) then the links on the sidebar have double slashes (eg https://basketball-v5.ui.dev/players//bonnie-eisenman
).
Removing the last slash from url
with url.slice(0, -1)
in Sidebar
fixes the issue.
I've seen people solving this by doing a redirect: <Redirect from="/:url*(/+)" to={pathname.slice(0, -1)} />
. Source:
https://jasonwatmore.com/post/2020/03/23/react-router-remove-trailing-slash-from-urls
https://jasonwatmore.com/post/2020/03/26/react-router-relative-links-example
Example comment
title: Why React Router? issue: description of issue.
I'll "hide" the comment when it's fixed.