Skip to content

Commit

Permalink
React18 (zenoamaro#793)
Browse files Browse the repository at this point in the history
* Fix duplicate toolbar issue

* Add react18 to peerDependencies

* Use React18 in demo
  • Loading branch information
g12i authored Jun 1, 2022
1 parent 2efde23 commit 20274fb
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
</head>
<body>
<div id="app"></div>
<script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/react@18/umd/react.development.js" crossorigin></script>
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js" crossorigin></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
<script src="react-quill.js"></script>
<script type="text/babel" src="index.js"></script>
Expand Down
9 changes: 6 additions & 3 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,10 @@ class Editor extends React.Component {

}

ReactDOM.render(
<Editor/>,
document.getElementById('app')
const root = ReactDOM.createRoot(document.getElementById('app'));

root.render(
<React.StrictMode>
<Editor />
</React.StrictMode>
);
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"quill": "^1.3.7"
},
"peerDependencies": {
"react": "^16 || ^17",
"react-dom": "^16 || ^17"
"react": "^16 || ^17 || ^18",
"react-dom": "^16 || ^17 || ^18"
},
"devDependencies": {
"@types/chai": "^4.2.11",
Expand Down
1 change: 0 additions & 1 deletion src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,6 @@ class ReactQuill extends React.Component<ReactQuillProps, ReactQuillState> {
destroyEditor(): void {
if (!this.editor) return;
this.unhookEditor(this.editor);
delete this.editor;
}

/*
Expand Down

0 comments on commit 20274fb

Please sign in to comment.