Programmatically Navigate using react-router

前端 未结 8 1314
佛祖请我去吃肉
佛祖请我去吃肉 2020-11-21 23:07

I am developing an application in which I check if the user is not loggedIn. I have to display the login form, else dispatch an action

8条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-21 23:30

    I would suggest you to use connected-react-router https://github.com/supasate/connected-react-router which helps to perform navigation even from reducers/actions if you want. it is well documented and easy to configure

提交回复
热议问题