Skip to content

Commit ce6cad0

Browse files
authored
Quick rerendering causes editor issues (#473)
Fix: The quick rerendering, especially in `React.StrictMode`, will no longer cause the editor errors. Closes #442, #469, #471, #476.
1 parent 93d7c69 commit ce6cad0

25 files changed

+1733
-464
lines changed

demo-multiroot-react-18/src/App.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React, { StrictMode, useState } from 'react';
22
import MultiRootEditorDemo from './MultiRootEditorDemo';
33
import MultiRootEditorRichDemo from './MultiRootEditorRichDemo';
44
import ContextMultiRootEditorDemo from './ContextMultiRootEditorDemo';
@@ -43,7 +43,7 @@ export default function App(): JSX.Element {
4343
};
4444

4545
return (
46-
<>
46+
<StrictMode>
4747
<h1>CKEditor 5 – useMultiRootEditor – development sample</h1>
4848

4949
<div className="buttons" style={ { textAlign: 'center' } }>
@@ -69,6 +69,6 @@ export default function App(): JSX.Element {
6969
</button>
7070
</div>
7171
{ renderDemo() }
72-
</>
72+
</StrictMode>
7373
);
7474
}

0 commit comments

Comments
 (0)