我正在调用动作创建者并将其发送到减速器并使用反应承诺来处理承诺。但是我收到一个错误,不确定如何修复它或在哪里查看我的代码。
this.props.loginUser(props)
.then(() => {
console.log("success");
}).catch(error =>{
console.log(error);
});
错误:
<body> tried to unmount. Because of cross-browser quirks it is impossible to unmount some top-level components (eg <html>, <head>, and <body>) reliably and efficiently. To fix this, have a single top-level component that never unmounts render these elements.
安装 React 应用程序:
ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
<Router history={browserHistory} routes={routes} />
</Provider>
, document.getElementById('app'));
索引.html
<body>
<div id="app"></div>
</body>