I have the following link:
<NavLink to={x.url} className={(x) = x.isActive ? 'active' : 'not-active' } >
<img src={`icon-default.svg`} /> // change from default.svg to active.svg
Link Text
</NavLink>
I have my icons inside the HTML and not the CSS, I want to call a different img according to isActive, is it possible to do it on a sub element (the img tag)?
react-router-dom": "^6.0.2"
Thanks