Skip to content
This repository has been archived by the owner on Nov 7, 2022. It is now read-only.

refactor(legacy-editor): improve react renderer for node view #457

Closed
wants to merge 1 commit into from

Conversation

Darmody
Copy link
Contributor

@Darmody Darmody commented Jul 21, 2022

If we render all node views through createPortal, we have to update the state to rerender the editor container component. This makes us have to handle React 18 async render issue with Prosemirror.

To make it easy, instead of creating portals in the root component, create the root for each node view.

instead of createPortal, createRoot for each node view
@github-actions
Copy link
Contributor

This pull request has been built and is available for preview at pr457.mashcard.dev.
Default username/password is test1@example.com & test1234.

Devtools

@Darmody Darmody marked this pull request as draft July 21, 2022 17:41
@Darmody
Copy link
Contributor Author

Darmody commented Jul 22, 2022

createRoot will separate node view components into different contexts, this is not what we want.

Improve rendering by #461

@Darmody Darmody closed this Jul 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant