react-activation icon indicating copy to clipboard operation
react-activation copied to clipboard

Hack <KeepAlive /> for React

Results 69 react-activation issues
Sort by recently updated
recently updated
newest added

问题重现步骤 1、双击公司管理列表跳转到卡片状态 2、切换到人员管理页签,双击人员管理列表跳转到卡片状态 3、等待几秒切换到公司管理,会发现卡片状态的form表单消失 4、在切换回人员管理,form表单同样消失 5、多切换几次form有可能会再次出现 尝试在卡片状态放一些其他组件,其他组件可以正常显示 [演示地址](https://codesandbox.io/p/github/zhouhai1993/React-Activation-error-demo/main?file=%2FREADME.md&workspace=%257B%2522activeFileId%2522%253A%2522clbd2k4w900077ogl363mgjg8%2522%252C%2522openFiles%2522%253A%255B%2522%252FREADME.md%2522%255D%252C%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522gitSidebarPanel%2522%253A%2522COMMIT%2522%252C%2522spaces%2522%253A%257B%2522clbd2k8210010386c89xqpm4g%2522%253A%257B%2522key%2522%253A%2522clbd2k8210010386c89xqpm4g%2522%252C%2522name%2522%253A%2522Default%2522%252C%2522devtools%2522%253A%255B%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A3000%252C%2522url%2522%253A%25223g4oww-3000.preview.csb.app%2522%252C%2522key%2522%253A%2522clbd2n1lr00au386ce08b1n35%2522%252C%2522isMinimized%2522%253Afalse%257D%252C%257B%2522type%2522%253A%2522TERMINAL%2522%252C%2522shellId%2522%253A%2522clbd2kpk800417ogl0311bz5i%2522%252C%2522key%2522%253A%2522clbd2kp8i0067386ca6dfrqed%2522%252C%2522isMinimized%2522%253Afalse%257D%255D%257D%257D%252C%2522currentSpace%2522%253A%2522clbd2k8210010386c89xqpm4g%2522%252C%2522spacesOrder%2522%253A%255B%2522clbd2k8210010386c89xqpm4g%2522%255D%257D)

```js function AliveItem(props) { const id = props.match.params.id const [query, setQuery] = useState() const shared = id % 2 === 0 // 双数共享同一份缓存 // 单数独享缓存 return ( setQuery('?name=test')}>Set Query )...

"react": "^18.2.0", "react-router-dom": "^6.3.0", "react-activation": "^0.12.0", 页面加载出来,空白,原来是被隐藏了啊,怎么解决啊

用例: ``` export default connect(({ global }: { global: any }) => ({ global, }))((props) => { return ( {/* 组件内无法 监听 global值的变化 */} ); }); ```

Hey, really useful library! I noticed it uses `create-react-context` as a dependency, and `create-react-context` only supports up to `react: ^16.0.0`. Do you think it's possible to remove that dependency and...

如果不添加cacheKey可以正常渲染,但是每次切换tab都会增加缓存,性能堪忧。 所以尝试添加了cacheKey 我是在router的包裹组件中添加的keep组件,如下 ``` export function AppliedRoute({ component: C, ...rest }) { // TODO:cacheKey={rest.cacheKey}添加后的显示问题 // eslint-disable-next-line max-len return isClient ? } /> : } />; } ``` 一共会缓存三个组件 1. 是layout,也就是顶层路由,匹配/*...

Hi, I have noticed a memory leak because of caching of element types in tryFixCtx function in fixContext.js file. As I see, tryFixCtx caches in a Map all the types...

首先,A页面 包裹了 KeepAlive。 A页面中的组件 使用 useContext,接受自定义hooks 中的 useState 暴露出来的值, 值变化 组件也会重新render。 然后A页面跳转了 B页面,再返回 A页面。 再次更改 自定义hooks 中的 useState 的值, A页面中的组件 不会重新 render。 使用的 : "react": "^18.2.0", "react-activation": "^0.12.4", 添加 以下代码也不行:...