We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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.<Route path={'/main/all-bill'} component={()=>} /> 2.<Route path={'/main/all-bill'} component={()=><KeepAlive when={false} saveScrollPosition={"false"} name='AllBill' id='AllBill'>} /> 这两种写法都无效,也就是说saveScrollPosition={false}属性无效,scroll位置还是被保存了,但是我不想缓存这个组件以及它的scroll
The text was updated successfully, but these errors were encountered:
saveScrollPosition={false} 这样呢
saveScrollPosition={false}
Sorry, something went wrong.
嗯~,我重新研究了一下,发现问题好像不是这么简单,KeepAlive里面保存的状态,useState里面的数据,我改变完以后,跳出去,再进来,发现又变成了初始状态,并没有保留我改变后的值
如果使用了 react 严格模式,需要关掉
No branches or pull requests
1.<Route path={'/main/all-bill'} component={()=>} />
2.<Route path={'/main/all-bill'} component={()=><KeepAlive when={false} saveScrollPosition={"false"} name='AllBill' id='AllBill'>} />
这两种写法都无效,也就是说saveScrollPosition={false}属性无效,scroll位置还是被保存了,但是我不想缓存这个组件以及它的scroll
The text was updated successfully, but these errors were encountered: