react-quill
react-quill copied to clipboard
Multiple instance of Editor
I found an issue with the component , it did work but create multiple instances. I have the code on sandbox
@devmnj I've downgraded react and react-dom to the 17.0.2 version and this solved this problem.
@necheporenko I tried, this time the screen was pure blank, no editor visible'
here is my dependency list
"dependencies": {
"@react-three/fiber": "^8.0.19",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^14.2.0",
"quill": "^1.3.7",
"quilljs": "^0.18.1",
"react": "^17.1.0",
"react-dom": "^18.1.0",
"react-quill": "^2.0.0-beta.4",
"react-scripts": "5.0.1",
"web-vitals": "^2.1.4"
},
@necheporenko your answer does work for me and it does work with latest react version too.
after few changes in index.js
Old code `import React from 'react'; import ReactDOM from 'react-dom/client'; import './index.css'; import App from './App';
const root = ReactDOM.createRoot(document.getElementById('root')); root.render( <React.StrictMode> <App /> </React.StrictMode> );`
New Code `import ReactDOM from "react-dom"; import React from "react"; import App from "./App";
const rootElement = document.getElementById("root"); ReactDOM.render(<App />, rootElement);`
you just don't use<React.StrictMode>.
my old code
ReactDOM.createRoot(document.getElementById('root')!).render( <React.StrictMode> <App /> </React.StrictMode> )
my new code:
ReactDOM.createRoot(document.getElementById('root')!).render( <App /> )
my code on sandbox