How can I disable a <Link>
in react-router, if its URL already active? E.g. if my URL wouldn't change on a click on <Link>
I want to prevent clicking at all or render a <span>
instead of a <Link>
.
The only solution which comes to my mind is using activeClassName
(or activeStyle
) and setting pointer-events: none;
, but I'd rather like to use a solution which works in IE9 and IE10.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…