我遇到了一个问题。当我使用React-Router时,当我链接到其他页面时,它将发送更多无用的请求,例如“ http:// localhost:8080 / undefined”,我该如何解决? Router code picture
<Route exact path={"/"}
render={({ location }) => {
return (getItemlocalStorage("Auth") !== null) ? (
urlMapping["/"]
) : (
<Redirect
to={{
pathname: "/Login",
}}
/>
);
}
}>
</Route>