在我的site.js文件中,我从index.ts导入商店
import React from 'react'
import ReactDOM from 'react-dom'
import { Provider } from 'react-redux'
import { BrowserRouter } from 'react-router-dom'
import App from '../components/site/App'
import {store} from '../components/site/src/app-config/index.ts'
ReactDOM.render(
<Provider store={store}>
<BrowserRouter>
<App/>
</BrowserRouter>
</Provider>, document.getElementById('root'))
export const store = createStore(rootReducer(history), applyMiddleware(thunk))
浏览器控制台出现问题:
browser.js:34未捕获的不变违规:您必须传递一个组件 连接到返回的函数。而是收到{}