Links
π¨βπΌ Our users want to get around the application quickly. So, we're going to add
a few links in a couple places.
We want the logo in the header and footer to link to
/
.On the page, we want to link to the user's notes
route.
On the route, we should link back to the
/users/kody
page. π° Tip, you can use a relative path (..
), but you'll need
to learn about
the relative
prop
on the Link
component.On the notes route, We should also link to the
/users/kody/notes/some-note-id
route.The
Link
component in Remix is a wrapper around the Link
component from
react router, so you can learn all about it in
the react router Link
docs.As a bit of extra credit, do your best to leverage relative routes where you can
rather than hard-coding the full path of the route. This will make it easier to
move files around relative to each other in the future.
Also, look into the
NavLink
component so
you can highlight the link to the some-note-id
route when that child route is
active. You can use the bg-accent
class name when the link is active.Remix is built on top of React Router, so you'll often find it beneficial to
read the React Router docs. Remix also provides a few extra features on top of
React Router, so you'll want to read the Remix docs as well.