2

my project was working well until yesterday, but from this morning I have this issue:

'PersistGate' cannot be used as a JSX component.
  Its instance type 'PersistGate' is not a valid JSX element.
    The types returned by 'render()' are incompatible between these types.

and I used the other guys solutions like add resolutions into the packages.json but it has just changed the error to another files :|.

My app.tsx:

import { ThemeProvider } from "styled-components";
import { Provider } from "react-redux";
import { PersistGate } from "redux-persist/integration/react";
import { store, persistor } from "src/Redux";

import { GlobalStyles } from "@components";
import { theme } from "@utils";
import { ModuleMain } from "@modules";
import "@translations/i18n";

function App() {
    return (
        <Provider store={store}>
            <GlobalStyles />
            <ThemeProvider theme={theme}>
                <PersistGate loading={null} persistor={persistor}>
                    <ModuleMain />
                </PersistGate>
            </ThemeProvider>
        </Provider>
    );
}

export default App;
Pedram
  • 21
  • 3
  • Does this answer your question? [React Native 'PersistGate' cannot be used as a JSX component. Its instance type 'PersistGate' is not a valid JSX element](https://stackoverflow.com/questions/71826046/react-native-persistgate-cannot-be-used-as-a-jsx-component-its-instance-type) – Jax-p Jun 06 '22 at 07:39
  • Not actually. Not fixed with it – Pedram Jun 06 '22 at 07:42
  • Have you tried ? `import { PersistGate } from 'redux-persist/es/integration/react'` – Philippe Jun 06 '22 at 11:28

0 Answers0