一种常见的处理方法是使用React Router库来管理路由。React Router提供了一种灵活的方式来定义和渲染路由组件。对于非私有路由,可以使用Route组件来定义,并将其放置在Switch组件中。例如: 代码语言:jsx 复制 import{BrowserRouterasRouter,Switch,Route}from'react-router-dom';functionApp(){return(<Router><Switch><R...
the action: "@@router/LOCATION_CHANGE"runs and takes it to the correct secure route but then"@@router/LOCATION_CHANGE"runs again and it redirects to"/"for a moment and finally "@@router/LOCATION_CHANGE"runs again and directs route back to the secure path, even thoughauthed === truethro...