An easy example which is used in the most basic menus is selecting the active link.
If you were to do it as the post author states, it would look like this (bad)
<ul>
<li><Link active={'/home' === window.location.pathname} to="/home">Home</Link></li>
<li><Link active={'/about' === window.location.pathname} to="/about">About</Link></li>
<li><Link active={'/contact-us' === window.location.pathname} to="/contact-us">Contact Us</Link></li>
</ul>