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,
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