mirror of
https://github.com/ueberdosis/tiptap.git
synced 2025-01-22 17:41:01 +08:00
13 lines
784 B
Markdown
13 lines
784 B
Markdown
|
---
|
||
|
"@tiptap/react": minor
|
||
|
"@tiptap/core": minor
|
||
|
---
|
||
|
|
||
|
This PR significantly improves the performance of React NodeViews in a couple of ways:
|
||
|
|
||
|
- It now uses useSyncExternalStore to synchronize changes between React & the editor instance
|
||
|
- It dramatically reduces the number of re-renders by re-using instances of React portals that have already been initialized and unaffected by the change made in the editor
|
||
|
|
||
|
We were seeing performance problems with React NodeViews because a change to one of them would cause a re-render to all instances of node views. For an application that heavily relies on node views in React, this was quite expensive.
|
||
|
This should dramatically cut down on the number of instances that have to re-render, and, making each of those re-renders much less costly.
|