ckeditor5-react icon indicating copy to clipboard operation
ckeditor5-react copied to clipboard

Double rendering in StrictMode when using Context

Open DeltekDavid opened this issue 1 year ago • 2 comments

We had no trouble with <StrictMode> when using <CKEditor> directly, but when we wrapped it in a <Context> we suddenly saw two editors. This had us pulling our hair, out until we discovered that Strict Mode deliberately renders everything twice. We removed <StrictMode> to unblock our proof of concept, but thought you'd like to know!

Doesn't seem like a dup of #294 since this is with <Context>.

FWIW, we extended the editor and context similar as in the collaboration sample. Perhaps wrapping that example's <App/> in<StrictMode> will reproduce it? The sample doesn't have a CRA-style start script so I'm not sure how to run it from source.

DeltekDavid avatar May 07 '24 18:05 DeltekDavid

@DawidKossowski, I remember you were looking into this or something similar, what's the status there?

Witoso avatar May 08 '24 06:05 Witoso

PR is ready, waiting for the final review: https://github.com/ckeditor/ckeditor5-react/pull/473

DawidKossowski avatar May 08 '24 08:05 DawidKossowski

@DeltekDavid Fix was released in https://github.com/ckeditor/ckeditor5-react/releases/tag/v7.0.0. Please reopen this issue (or open another one) if it's still reproducible.

Mati365 avatar Jun 06 '24 07:06 Mati365