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

React 19 - A React Element from an older version of React was rendered. This is not supported. It can happen if #949

Open
orbachar opened this issue Mar 23, 2025 · 1 comment

Comments

@orbachar
Copy link

Image

Getting this error when trying to use this lib with React 19

import React from 'react';
import { createRoot } from 'react-dom/client';
import { StoreProvider } from 'easy-peasy';
import store from './store';

const container = document.getElementById('root');
if (!container) throw new Error('Root element not found');

const root = createRoot(container);

root.render(
        <StoreProvider store={store}>
            <div></div>
        </StoreProvider>
);

@jmyrland
Copy link
Collaborator

Based on the error message, it doesn't seem like you are on React 19.

Are you able to create a reproduction of this issue in a sandbox?

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

2 participants