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

embed() does not work with React 18 #1096

Open
sehilyi opened this issue Jan 23, 2025 · 0 comments
Open

embed() does not work with React 18 #1096

sehilyi opened this issue Jan 23, 2025 · 0 comments
Labels
bug🐛 Something isn't working

Comments

@sehilyi
Copy link
Member

sehilyi commented Jan 23, 2025

The error message when embed() is called:

Uncaught (in promise) TypeError: m.createRoot is not a function at createRoot

createRoot is only supported in React 18. But, we allow users to use either of React 16, 17, or 18. So, we will need to check the version of React that the user is using and call the proper function available.

createRoot(element).render(component);

@sehilyi sehilyi added the bug🐛 Something isn't working label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant