ant-design conflicts with React and causes the application to crash, how to resolve the conflict?
P粉768045522
P粉768045522 2023-09-12 11:16:02
0
1
731

I upgraded to React 18.2.0. Now sometimes the app freezes. The browser page stopped responding. What could be the problem? I noticed that this happens when interacting with elements that display popups in Ant-design 4 (Cascader, Select, etc.). How can I solve this problem? I must say right off the bat that it is not possible to update ant-design to the latest version since all styles are now on less and in version 5 styled-components

I don't know what I can do. Maybe use flushsync? But I don’t know where

P粉768045522
P粉768045522

reply all(1)
P粉141035089

I believe this is related to the strict mode of react 18, or maybe a bug of Ant-Design on the previous version, my suggestion is to try to upgrade your Ant-design version to 5.x (if possible) or at least 4.24.12 (to avoid any major update breaks), please provide crash logs or more details about code usage if that doesn't help.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template