GA-MO / react-confirm-alert

react component confirm dialog.
https://ga-mo.github.io/react-confirm-alert/demo/
MIT License
273 stars 105 forks source link

Upgrade to React18? #74

Closed vova42matters closed 2 years ago

vova42matters commented 2 years ago

ReactDOM now uses a bit different structure for render and unmountComponentAtNode. When using react-confirm-alert with React18 an error gets thrown

ergisgjergji commented 2 years ago

@vova42matters I have opened a PR for this. But until it's merged, you can use @ergisgjergji/react-chat-plugin: I published it under my own registry as I needed to use it ASAP and who knows when the PR will be merged...

vova42matters commented 2 years ago

@GA-MO #75

Aravin commented 2 years ago

I am getting the following error

File '.../node_modules/@ergisgjergji/react-confirm-alert/index.d.ts' is not a module.ts(2306)

when I install npm package from your repo https://www.npmjs.com/package/@ergisgjergji/react-confirm-alert

Aravin commented 2 years ago

Even if I ignore this error

getting this error while calling the delete fn

next-dev.js?3515:25 Warning: You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.

ergisgjergji commented 2 years ago

@Aravin can't say much. I've installed/used it on different PC's now. Maybe try npm i --force. As for the warning: maybe you are doing a double-call of confirmAlert. As per the 2nd error, can you provide some short code how you are calling it / which props are you using?

Aravin commented 2 years ago

I no longer use that react-confirm-alert.

GA-MO commented 2 years ago

Version 3.0.0 is out for support React 18.

vova42matters commented 2 years ago

@GA-MO Thanks!