小编J T*_*ang的帖子

React Route 中 useHistory() 和 props.history 有什么区别

在我的反应函数中,我可以写:

const history = props.history; 或者 const history = useHistory();

然后我可以使用history.push()history.goBack()以同样的方式。

所以我想知道它们是否不同?

history routes reactjs

6
推荐指数
1
解决办法
1670
查看次数

标签 统计

history ×1

reactjs ×1

routes ×1