簡體   English   中英

警告:從生命周期方法內部調用了 flushSync

[英]Warning: flushSync was called from inside a lifecycle method

有人知道如何在警告后調試和修復(或靜音)嗎(顯然, Mantine在下一個主要版本中放棄了react-popper )?

一切正常,但警告使調試其他問題變得非常困難。

Warning: flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.
    at Popper (webpack-internal:///./node_modules/@mantine/core/esm/components/Popper/Popper.js:67:3)
    at div
    at eval (webpack-internal:///./node_modules/@mantine/core/esm/components/Box/Box.js:42:18)
    at Popover (webpack-internal:///./node_modules/@mantine/core/esm/components/Popover/Popover.js:76:85)
    at O (webpack-internal:///./node_modules/styled-components/dist/styled-components.browser.esm.js:30:19811)
    at SecretTextareaWithLength (webpack-internal:///./src/main/routes/Create.tsx:106:48)
    at form
    at div
    at O (webpack-internal:///./node_modules/styled-components/dist/styled-components.browser.esm.js:30:19811)
    at Create (webpack-internal:///./src/main/routes/Create.tsx:291:48)
    at Routes (webpack-internal:///./node_modules/react-router/index.js:920:5)
    at MenuEvents (webpack-internal:///./src/main/MenuEvents.tsx:34:55)
    at Router (webpack-internal:///./node_modules/react-router/index.js:854:15)
    at MemoryRouter (webpack-internal:///./node_modules/react-router/index.js:767:5)
    at MantineProvider (webpack-internal:///./node_modules/@mantine/styles/esm/theme/MantineProvider.js:66:3)
    at App (webpack-internal:///./src/main/App.tsx:40:35)

這是使用 Popper 時 mantine 中的一個錯誤 它將在下一個版本中修復。

您可以做的一件事是破解您的本地反應副本以添加條件邏輯並跳過此警告。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM