Skip to content

Commit bef197b

Browse files
committed
export react context to use class component like Class.contextType or Context.Consumer
1 parent b501a62 commit bef197b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/react/EditorProvider.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { EditorState, Plugin } from 'prosemirror-state'
33
import { EditorProps, EditorView } from 'prosemirror-view'
44
import React, { createContext, useContext, useState } from 'react'
55

6-
const EditorStateContext = createContext<EditorState | null>(null)
7-
const EditorViewContext = createContext<EditorView | null>(null)
6+
export const EditorStateContext = createContext<EditorState | null>(null)
7+
export const EditorViewContext = createContext<EditorView | null>(null)
88

99
export const useEditorState = (): EditorState => {
1010
const context = useContext(EditorStateContext)

0 commit comments

Comments
 (0)