Subscribe to the editor's toolbar snapshot via useSyncExternalStore.
The snapshot is reference-stable between transactions, so components
re-render only when the editor state actually changed, typing never
re-renders the React tree hosting the editor surface itself.
Subscribe to the editor's toolbar snapshot via
useSyncExternalStore. The snapshot is reference-stable between transactions, so components re-render only when the editor state actually changed, typing never re-renders the React tree hosting the editor surface itself.