react-router: How to disable a <Link>, if its active?

后端 未结 9 1030
谎友^
谎友^ 2020-12-14 06:10

How can I disable a in react-router, if its URL already active? E.g. if my URL wouldn\'t change on a click on I want to p

9条回答
  •  醉话见心
    2020-12-14 06:29

    I think you should you atrribute to=null to set disable a link.

    See an example at here https://stackoverflow.com/a/44709182/4787879

提交回复
热议问题