Open marccmartian opened 2 years ago
Hello, I have the same problem as above. I'm working with react v18.1 and Next.js v12.1.6. I try to debug this by reactdevtools and i see that state of link doesn't change. Active stay always on false
Experiencing the same. I was experiencing this issue, but seemed to have fixed it?
In my case, I had one link that I had set spy={false}
while wanting to spy on other links. Setting spy={true}
for all links seemed to resolve the issue, as I am now getting the correct activeClass
styles.
hacky solution,
<Link activeClass='active' smooth spy to={item.key} onSetActive={()=>{setActiveSection(item.key)}}>
<MenuItem key={item.key} selected={activeSection === item.key} onClick={() => handleMenuClick(item.key)}>
I'm working with react v18 and react router dom v6 Everything is ok but the activeClass prop doesn't works. I think It's not compatible yet...
I have inspected the console and in the html when I click the link, it doesn't generate the "active" class.