Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Double rendering in StrictMode when using Context #476

Closed
DeltekDavid opened this issue May 7, 2024 · 3 comments
Closed

Double rendering in StrictMode when using Context #476

DeltekDavid opened this issue May 7, 2024 · 3 comments
Labels
squad:collaboration Issue to be handled by the Collaboration team.
Milestone

Comments

@DeltekDavid
Copy link

DeltekDavid commented May 7, 2024

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.

@Witoso
Copy link
Member

Witoso commented May 8, 2024

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

@DawidKossowski
Copy link
Contributor

PR is ready, waiting for the final review: #473

DawidKossowski pushed a commit that referenced this issue May 9, 2024
Fix: The quick rerendering, especially in `React.StrictMode`, will no longer cause the editor errors. Closes #442, #469, #471, #476.
@Mati365
Copy link
Member

Mati365 commented Jun 6, 2024

@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 Mati365 closed this as completed Jun 6, 2024
@Witoso Witoso added the squad:collaboration Issue to be handled by the Collaboration team. label Jun 7, 2024
@DawidKossowski DawidKossowski added this to the iteration 74 milestone Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
squad:collaboration Issue to be handled by the Collaboration team.
Projects
None yet
Development

No branches or pull requests

4 participants