Day 21:
Hi so today we’re going to be keeping it short! I’ve been using Reach Router for one of my web app projects and I wanted to figure out a way to highlight the current page in the navigation bar. Now the beauty of Reach Router, and the rest of the Reach React library is that everything is made with accessibility in mind. That’s why whichever URL is the current one has a special ARIA property (which I spoke about a few days ago). With a little bit of CSS, you can target the attribute like so:
[aria-current="page"]{font-weight:bold;}
That’s my short lesson for today! Until next time.