If you'll run react-jobs without SSR and will use asyncBootstrap for other needs, that can not be covered by react-jobs at the moment (#39), it will break async bootstrapper from crawling the tree: all the asyncBoostrap() methods won't be called if they are placed after react-job in react tree on client side.
I think, that we should always resolve asyncBootstrap methods, even if env === 'browser' to provide consistent behavior. If asyncBootstrap was called, react-jobs must resolve work, so that it will be completed and the render can be continued to the next component.
@ctrlplusb what do you think? I really need to solve this and #39. I can create PR if you'll accept the changes
If you'll run react-jobs without SSR and will use asyncBootstrap for other needs, that can not be covered by react-jobs at the moment (#39), it will break async bootstrapper from crawling the tree: all the
asyncBoostrap()
methods won't be called if they are placed after react-job in react tree on client side.You can check this test out:
You'll receive the following output:
I think, that we should always resolve asyncBootstrap methods, even if
env === 'browser'
to provide consistent behavior. If asyncBootstrap was called,react-jobs
must resolve work, so that it will becompleted
and the render can be continued to the next component.@ctrlplusb what do you think? I really need to solve this and #39. I can create PR if you'll accept the changes