redux-async-connect
redux-async-connect copied to clipboard
A least one Component in Route must be asyncConnected, otherwise server rendering returns noscript
Say I have routes setup like this:
RootLayoutComponent
--/
----HomeViewComponent
------AHomeComponent
--/subpage
----SubpageViewComponent
------asyncConnect(ASubpageComponent)
/subpage server renders correctly however / only returns
the workaround seems to be, force at least one component on the page to be asyncConnected
achievable by something like this on the root component:
const AsyncRootLayout = asyncConnect([{
deferred: false,
promise: ({store}) => {
return Promise.resolve(0)
}
}])(RootLayout)
export default AsyncRootLayout;
is this the expected behaviour?
Maybe linked to #60