You can specify the end
prop on the “root”-level link to the "/dashboard"
path.
If the
end
prop is used, it will ensure this component isn’t matched
as “active” when its descendant paths are matched.
<NavLink to='' end>
{({ isActive }) =>
isActive ? (
<text style={{color: blue}}>Home</text>
) : (
<text>Home</text>
)
}
</NavLink>