react-popper
react-popper copied to clipboard
usePopper has something wrong with ReactDom.flushSync

how can i resolve the problem
May you provide more details please?
May you provide more details please?
i saw the open code react-popper hooks usePopper peerDependencies support react 16.8.0,
"peerDependencies": { "@popperjs/core": "^2.0.0", "react": "^16.8.0 || ^17 || ^18", "react-dom": "^16.8.0 || ^17 || ^18" },
but it didn't work on browser, my react-dom version is 16.8 same as react
error is ReactDOM.flushSync is not a function

what is the value of console.log(ReactDOM)?
what is the value of
console.log(ReactDOM)?

the problem is resolved. use the version 2.2.5 can run successful.it seems that the ReactDOM. flushSync hooks acting on React version 18.x。
is the latest version 2.3.0 only suitable for React 18.x ?
What you logged is React, not ReactDOM. There may be some problem with your setup.