A least one Component in Route must be asyncConnected, otherwise server rendering returns noscript
djeeg opened this issue · comments
djeeg commented
Say I have routes setup like this:
RootLayoutComponent
--/
----HomeViewComponent
------AHomeComponent
--/subpage
----SubpageViewComponent
------asyncConnect(ASubpageComponent)
/subpage server renders correctly
however / only returns tags (ie no server rendering)
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?
Aurélien Chivot-Buhler commented
Maybe linked to #60