-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
安装使用出现的几个问题 #1
Comments
感谢您的宝贵意见,第一个问题已经解决,会发布新版本 , 第二个问题 我想问一下外层是否没有 KeepliveRouterSwitch 包裹呢,如果有的话 ,可以复制一下代码。 |
您好,这个问题已经修复, import { KeepaliveRouterSwitch ,KeepaliveRoute } from 'react-keepalive-router'
const RouteWithSubRoutes = (item)=> <div style={{ background:'pink' }} > <KeepaliveRoute path={item.path} component={ item.component } ></KeepaliveRoute> </div>
const index = () => {
return <div >
<div >
<Router >
<Meuns/>
<KeepaliveRouterSwitch>
{
[{ path:'/detail' ,component:Detail }].map(item=> <RouteWithSubRoutes key={item.path} {...item} />)
}
<Route path={'/index'} component={Index} ></Route>
<Route path={'/list'} component={List} ></Route>
{/* 路由不匹配,重定向到/index */}
<Redirect from='/*' to='/index' />
</KeepaliveRouterSwitch>
</Router>
</div>
</div>
} |
组件内部传入的属性props 不再具有props.history功能 请问怎么跳转呢 |
现在可以用 import { withRouter } from 'react-router-dom'
function index(props) {
console.log(props)
return <div>
demo
</div>
}
export default withRouter(index) |
厉害 现在整个流程可以走通了 如果后续发现问题也会及时反馈 非常感谢 |
好的 ,非常感谢您的及时反馈,这个项目,刚开始做,后续会完善功能,后续功能从页面到组件,你们的反馈是我前进方向与动力🙏🙏🙏。一起加油,一起努力❤️❤️❤️ |
您好, 修复后 ,我会第一时间通知您。 |
好的 非常感谢 |
hello,您好,发布 感谢您的支持~~~ |
您好 |
hello ,您好 , 我这就看,感谢您的反馈 ,第一时间通知,这边您方便提供一下 销毁缓存的代码吗 |
好的 我这边尽快处理问题 ,第一时间通知您 |
好的 |
您好,最近有点忙让您久等了, 1 用 2 跨层级路由,路由匹配问题。 3 |
cacheId在哪里定义的,reademe里面没看到啊,还是就是字符串'cacheId'啊 |
您好, |
|
1.引入进来提示invariant未安装 需要手动安装
2.安装完后跑起来没有报错 但也没有缓存路由
The text was updated successfully, but these errors were encountered: