Closed existenceO closed 8 months ago
reference: https://github.com/irychen/keepalive-for-react/blob/main/src/components/KeepAlive/index.tsx
<KeepAlive activeName={cacheKey}
exclude={[/\/exclude-counter/]}
max={10} strategy={'LRU'}>
{outlet}
</KeepAlive>
KeepAlive.props.include or KeepAlive.props.exclude Array<string | RegExp> | string | RegExp;
Accordingt to your code, you may need this.
<KeepAlive activeName={cacheKey}
exclude={[/^\/product-detail\//]}
max={10} strategy={'LRU'}>
{outlet}
</KeepAlive>
Thanks!
你好! 想问一下,如果包裹的是router的useOutlet的话,可以怎么include/exclude page呢?
我下载的包版本是v2.0.0