Closed romanenko closed 7 years ago
I've managed to avoid this error by disabling async-components
. But I'm sure, proper error handling would be a great addition to this case.
same issue, not sure how to combine createAsyncComponent
and withJob
I have a solution coming soon. I had planned for it to be released the beginning of this week, but got swept away with life stuff. Will keep you all posted.
I'm also interested in a solution to this. So far w/ async component is great for server side, I still want to fetch and pre-render data with React Router v4 and have been at a loss as to how to do it without static routes (which I think defeats the purpose of the new router API)
Hey all!
I have rewritten react-jobs
. It now has complete interop with react-async-component
.
See a demo here: https://react-universally-jobs.now.sh
It's on a branch within react-universally
.
🎉
@ctrlplusb could you double check that branch link please? i don't see a next/react-jobs branch
@ctrlplusb sorry to bug you again, but i don't see any reference to react-jobs
in that branch. I almost got it working, but I don't get anything on the server even though the work
function runs, so would be great to see your example.
Doh! I did something really really silly!
Coming soon!
Up! :)
awesome thanks @ctrlplusb everything works. Love your work on these tough problems!
First of all, thanks for the great library and an amazing
react-universally
starter kit!I'm in the process of migrating of my project, based on
react-universally@12
toreact-universally@next(v13)
. I'm following and implementing changes, according PR here: https://github.com/ctrlplusb/react-universally/pull/366.There is an Error thrown when during SSR, when require and use
withJob()
:https://github.com/ctrlplusb/react-jobs/blob/master/src/ssr/withJob.js#L60
This error happens server-side, and my investigations hints me, that, maybe, context does not get injected for some reason.
I decided to fill an issue here, in this project, because, even if I'm doing something wrong, in my opinion, we should handle and catch this exception somehow inside
react-jobs
.