React 19 will remove findDOMNode
React 19 will be officially released in June/July 2024 and it removes the deprecated ReactDOM.findDOMNode utility. It appears that this will prevent react-quill users from upgrading to React 19.
I recently installed React 18.3 (which was released about a week ago) and it started issuing warnings about this:
Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node
I didn't see another issue opened regarding the removal of findDOMNode so I thought I'd bring this issue to the attention of the maintainers (@zenoamaro @alexkrolick).
Thank you for your on-going maintenance of this project!
Ticket due diligence
- [X] I have verified that the issue persists under ReactQuill
v2.0.0-beta.2 - [ ] I can't use the beta version for other reasons
ReactQuill version
- [ ] master
- [X] v2.0.0-beta.2
- [ ] v2.0.0-beta.1
- [ ] 1.3.5
- [ ] 1.3.4 or older
- [ ] Other (fork)
Just in case. In the Quill playground, there's an example of using Quill with React: https://quilljs.com/playground/react
Here's a PR that proposes a fix for this issue: #980. Not sure if the maintainer(s) are actively monitoring, but I have been testing it locally and it works great.
@zenoamaro @alexkrolick It looks like we have a pull request open that resolves this issue (#980). Could you review and approve?
You can use this meanwhile, added your fix here: npm i react-quill@https://github.com/lassespilling/react-quill-2024/tree/package
This repository is not being maintained, so I'm trying to maintain a fork in the interim. See react-quill-new. The fork updates the underlying Quill dependency that uses the deprecated event to use the newer API instead, and also updates type definitions and build process. Follow https://github.com/zenoamaro/react-quill/pull/973 for updates on that.
@VaguelySerious thanks a lot, in the package you have provided you also fixed other issues, like returning to new line, class styles etc..