我正在使用提供程序设置React Redux,但它总是返回一条错误消息,提示未找到./store。我在这里做错了什么?以及我需要在index.js文件中设置什么?
这是我首先浏览了React.js Redux网站,试图设置Provider并设置react-cookies。
import 'bootstrap/dist/css/bootstrap.min.css';
import React from 'react';
import ReactDOM from 'react-dom';
import './sass/main.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { Provider } from 'react-redux'
import { CookiesProvider } from 'react-cookie';
import store from './store'
const rootElement = document.getElementById('cantainer')
ReactDOM.render(
<Provider store={store}>
<CookiesProvider>
<App />,
rootElement
</CookiesProvider>
</Provider>
);
serviceWorker.unregister();
import 'bootstrap/dist/css/bootstrap.min.css';
import React from 'react';
import ReactDOM from 'react-dom';
import './sass/main.scss';
import App from './App';
import * as serviceWorker from './serviceWorker';
import { Provider } from 'react-redux'
import { CookiesProvider } from 'react-cookie';
import store from './store'
const rootElement = document.getElementById('cantainer')
ReactDOM.render(
<Provider store={store}>
<CookiesProvider>
<App />,
rootElement
</CookiesProvider>
</Provider>
);
这是错误消息: ./src/index.js 找不到模块:无法在'/ Users / mirasmith / Desktop / KPV1-Project-master / src'中解析'./store'