我知道在React.js中,如果你想点击一个按钮来触发位置的改变,我可以使用这个: import { useHistory } from "react-router-dom";
let history = useHistory();
history.push("/home");<button type="button" onCli
因此,我将history.push()放入提交函数的API结果中,以便当结果状态为"true“时,将执行history.push()。但是这里发生的问题是,history.push完全执行,并且URL正确地更改为localhost:3000/仪表板,但是我的页面根本没有变化。这是我的密码import React from 'react';import &