Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

233
Views
'Provider' cannot be used as a JSX component. Its instance type 'Provider<AnyAction>' is not a valid JSX element. TS2786

Makes the Redux store available to the connect() calls in the component hierarchy below.

'Provider' cannot be used as a JSX component. Its instance type 'Provider' is not a valid JSX element. The types returned by 'render()' are incompatible between these types. Type 'React.ReactNode' is not assignable to type 'import("C:/Users/Nilay/Desktop/nilay/src/pages/Home/Reel/node_modules/@types/react/index").ReactNode'. Type '{}' is not assignable to type 'ReactNode'.ts(2786)

can anyone can tell how to fix this i have tried npm install again my node version is 18plus

img here

    import React from "react";
import ReactDOM from "react-dom";
import "./index.css";
import App from "./App";
import { store } from "./app/store";
import { Provider } from "react-redux";
import * as serviceWorker from "./serviceWorker";
import { BrowserRouter as Router } from "react-router-dom";
import { ApolloProvider } from "@apollo/client";
import { apolloClient } from "./utils/index";

ReactDOM.render(
  <React.StrictMode>
    <Router>
      <ApolloProvider client={apolloClient}>
        <Provider store={store}>
          <App />
        </Provider>
      </ApolloProvider>
    </Router>
  </React.StrictMode>,
  document.getElementById("root")
);


serviceWorker.unregister();
about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

It seems like @types/react problem with multiple versions. Try to uninstall react-redux and react (check that the dependencies removed) and install again.

Also try to install @types/react, its installed through dependencies.

Some workarounds can be found here: https://github.com/facebook/react/issues/24304#issuecomment-1094565891

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!