简体   繁体   中英

Provider tag makes screen go blank in react

When I remove the <Provider> tag I get the output, when I put that tag screen goes blank.

index.js file is below

import {Provider} from 'react-redux'

ReactDOM.render(
  <React.StrictMode>
    <Provider>
      <App />
    </Provider>
  </React.StrictMode>,
  document.getElementById('root')
);

app.js file is below

function App() {
  return (
  <div className="App"> 
     App Home
  </div>
  );
}

Please let me know what to do?

React-redux Provider expects to receive a "store" prop. You can check the docs: https://react-redux.js.org/api/provider

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM