How to push to History in React Router v5?

后端 未结 1 453
我寻月下人不归
我寻月下人不归 2021-01-21 04:50

Is it possible to create a global history file to manage the createBrowserHistory() on react-router-dom v5? I know the V5 has the useHistory() as a way to get the history. But i

相关标签:
1条回答
  • 2021-01-21 04:53

    As the doc says you should use the v4 of history to work on react-router v5.

    https://github.com/ReactTraining/history

    Documentation for version 4 can be found on the v4 branch. Version 4 is used in React Router versions 4 and 5.

    0 讨论(0)
提交回复
热议问题