Skip to content
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

autoFreeze 模式下,context 失效 #295

Open
getatny opened this issue Oct 24, 2023 · 3 comments
Open

autoFreeze 模式下,context 失效 #295

getatny opened this issue Oct 24, 2023 · 3 comments

Comments

@getatny
Copy link

getatny commented Oct 24, 2023

autoFreeze 在执行过内部 safeSetState({ freeze: true }) 之后,Antd 的 configProvider theme 变化不再被缓存组件内部监听。已经尝试了 autoFixContext,还是不行。

关闭 autoFreeze 或者 Keeper 内部 freeze state 没有变成 true 之前运行正常

@CJY0208
Copy link
Owner

CJY0208 commented Oct 24, 2023

和 autoFreeze 相关的话,应该是,比较可能是 react 18 createRoot 不兼容的问题,可以给个示例吗?这个问题目前可能无法修复,只能是关闭 autoFreeze

@getatny
Copy link
Author

getatny commented Oct 24, 2023

和 autoFreeze 相关的话,应该是,比较可能是 react 18 createRoot 不兼容的问题,可以给个示例吗?这个问题目前可能无法修复,只能是关闭 autoFreeze

尝试了使用 reactDom.render 去渲染 App,问题确实修复了。我后面可以提供一个 codesandbox 的示例给你看下

@CJY0208
Copy link
Owner

CJY0208 commented Oct 24, 2023

不需要提供示例了,这个问题已经记录过,是 react-freeze 和 react18 暂不兼容导致的

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants