redocx
redocx copied to clipboard
Using Context Throws an Error
If you wrap the document with a context provider, it throws the error
Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.\n\nCheck the render method of `ContextProvider`.
To Replicate
import React, {createContext} from 'react'
import { render, Document, Text } from 'redocx';
const ContextProvider = createContext().Provider
render(
<ContextProvider>
<Document>
<Text>Hello</Text>
</Document>
</ContextProvider>
);