I am calling an action creator and sending it to the reducer and using react promise to handle the promise. But I am getting an error, and unsure how to fix it or where to look in my code.
this.props.loginUser(props)
.then(() => {
console.log("success");
}).catch(error =>{
console.log(error);
});
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.
Mount React App:
ReactDOM.render(
<Provider store={createStoreWithMiddleware(reducers)}>
<Router history={browserHistory} routes={routes} />
</Provider>
, document.getElementById('app'));
index.html
<body>
<div id="app"></div>
</body>