search

Home  >  Q&A  >  body text

ant-design conflicts with React and causes the application to crash, how to resolve the conflict?

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粉768045522P粉768045522506 days ago782

reply all(1)I'll reply

  • P粉141035089

    P粉1410350892023-09-13 09:22:03

    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.

    reply
    0
  • Cancelreply