<NavHashLink /> : Warning: React does not recognize the `isActive` prop on a DOM element

600 views Asked by At

I'm getting this warning when using <NavHashLink /> from the react-router-hash-link NPM package, like this:

<NavHashLink to='#contact' className='btn btn-primary'>

Everything is working as intended but I would like to know what's causing this error and how to avoid it.

1

There are 1 answers

0
victorchtl On

I have a related issue using 'NavHashLink' with react router v6 and i get rid of the problem by simply using 'HashLink' like this :

<HashLink to="/url/#anchor">
   content
</HashLink>

hope it will help!