From d6e4cafef3b3e5383ee7820d2cd505fbc1692151 Mon Sep 17 00:00:00 2001 From: Nick the Sick Date: Wed, 30 Oct 2024 10:17:18 +0100 Subject: [PATCH] revert: "chore: memoize the editor context value" This reverts commit e2787e4736002dd85e196ef73f602ac901fe6392. --- packages/react/src/Context.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/react/src/Context.tsx b/packages/react/src/Context.tsx index 5677e3973..8c285d837 100644 --- a/packages/react/src/Context.tsx +++ b/packages/react/src/Context.tsx @@ -1,7 +1,6 @@ import { Editor } from '@tiptap/core' import React, { createContext, HTMLAttributes, ReactNode, useContext, - useMemo, } from 'react' import { EditorContent } from './EditorContent.js' @@ -38,14 +37,13 @@ export function EditorProvider({ children, slotAfter, slotBefore, editorContainerProps = {}, ...editorOptions }: EditorProviderProps) { const editor = useEditor(editorOptions) - const editorContextValue = useMemo(() => ({ editor }), [editor]) if (!editor) { return null } return ( - + {slotBefore} {({ editor: currentEditor }) => (