在我的反应函数中,我可以写:
const history = props.history; 或者 const history = useHistory();
const history = props.history;
const history = useHistory();
然后我可以使用history.push()或history.goBack()以同样的方式。
history.push()
history.goBack()
所以我想知道它们是否不同?
history routes reactjs
history ×1
reactjs ×1
routes ×1