I defined NavLinks for styling an active link.
For instance I tried several approaches of this kind:
<NavLink to="contact" className={({ isActive }) => (isActive ? 'nav-links-active' : 'nav-links')}>
Contact
</NavLink>
This doesn't work and the IDE returns:
Type function({isActive: any}): string | string is not assignable to type string | undefined Type function({isActive: any}): string | string is not assignable to type string
Do I have to define isActive somewhere? What am I doing wrong?