答案 0 :(得分:0)
我会这样:
const location = {
pathname: '/somewhere',
state: { title: 'someTitle'}
}
<NavLink to={location}/>
然后您不是从道具而是从location.state
答案 1 :(得分:0)
尝试
<NavLink
to={{
pathname:"/sum-patch",
aboutProps:{title:"title Props"}
}}