From f3689631a7ac242726bf38c3d849a38a18f56346 Mon Sep 17 00:00:00 2001 From: "NAKWONCHOIDESK1\\NakWonCHOI" Date: Wed, 16 Feb 2022 17:37:21 +0900 Subject: [PATCH] export react context to use class component like `Class.contextType` or `Context.Consumer` (cherry picked from commit bef197b37da6eb2a2b0d1129d38d97f5f903e3d4) --- packages/react/EditorProvider.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/EditorProvider.tsx b/packages/react/EditorProvider.tsx index 19ff6c2..abc6130 100644 --- a/packages/react/EditorProvider.tsx +++ b/packages/react/EditorProvider.tsx @@ -3,8 +3,8 @@ import { EditorState, Plugin } from 'prosemirror-state' import { EditorProps, EditorView } from 'prosemirror-view' import React, { createContext, useContext, useState } from 'react' -const EditorStateContext = createContext(null) -const EditorViewContext = createContext(null) +export const EditorStateContext = createContext(null) +export const EditorViewContext = createContext(null) export const useEditorState = (): EditorState => { const context = useContext(EditorStateContext)