Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using Context Throws an Error #30

Open
hazem3500 opened this issue Sep 21, 2021 · 0 comments
Open

Using Context Throws an Error #30

hazem3500 opened this issue Sep 21, 2021 · 0 comments

Comments

@hazem3500
Copy link

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>
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant