Overview
In src/components/editor/RichContentEditor.tsx ToolbarButton is declared inside the component body (lines 46-72), giving it a new component identity on every keystroke-driven re-render and remounting all toolbar buttons. Hoist it to module scope or wrap it with memo/useCallback.
Overview
In src/components/editor/RichContentEditor.tsx ToolbarButton is declared inside the component body (lines 46-72), giving it a new component identity on every keystroke-driven re-render and remounting all toolbar buttons. Hoist it to module scope or wrap it with memo/useCallback.