Programmatically navigate using react router

后端 未结 30 2439
無奈伤痛
無奈伤痛 2020-11-21 05:18

With react-router I can use the Link element to create links which are natively handled by react router.

I see internally it calls t

30条回答
  •  一个人的身影
    2020-11-21 05:31

    React-Router V4

    if you're using version 4 then you can use my library (Shameless plug) where you simply dispatch an action and everything just works!

    dispatch(navigateTo("/aboutUs"));
    

    trippler

提交回复
热议问题