You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dipatch and getState not being made available to async action creators during server side rendering. Everything seems to work fine on client side. I am including the relevant parts of the code below. I can't seem to put my finger on what I am missing here. Thanks in advance for any help/pointers.
I am using Express.js middleware to render server side like so,
import{reducerasreduxAsyncConnect}from'redux-async-connect';constrootReducer=combineReducers({// other reducers removed
reduxAsyncConnect
})
Here's what my routes look like,
constApp=({ store, history })=>(<Providerstore={store}key="provider"><Routerhistory={history}render={(props)=><ReduxAsyncConnect{...props}filter={item=>!item.deferred}/>}>{routes}</Router></Provider>)conststore=configureStore()consthistory=syncHistoryWithStore(browserHistory,store)render(<Appstore={store}history={history}/>,document.getElementById('root'))
Here are my action creators. Here I get error UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'dispatch' of undefined
dipatch
andgetState
not being made available to async action creators during server side rendering. Everything seems to work fine on client side. I am including the relevant parts of the code below. I can't seem to put my finger on what I am missing here. Thanks in advance for any help/pointers.I am using Express.js middleware to render server side like so,
I have added
reduxAsyncConnect
reducer like soHere's what my routes look like,
Here's the root component
Here are my action creators. Here I get error
UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'dispatch' of undefined
The text was updated successfully, but these errors were encountered: