-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Execute job for both server and client #39
Comments
Hmmm, not sure I follow. Do you mind giving me a bit more of an example of what you are trying to achieve? |
I'm implementing i18n for react app. In order to init locale you need:
I've wrapped this things in The last one step can not be serialized into the state and must be done on both sides. For node it should be always done, because node includes data only for en locale. For browser only if we deal with safari < 10 and some other old browsers. Of coarse, I can implement this integration without any react-jobs or asyncBootstrap (my current way to achieve this), but the If you don't mind such a feature, I could even create a PR, but first we should decide about an API. |
Another one use case: dynamically loading IoC container chunk for theme-specific react components. They can not be serialized to json and must be loaded on both sides. |
@ctrlplusb what do you think about providing something different to |
Sometimes you have a work, that should be completed on both sides (server and client), e.g. app initialization.
What do you think about providing a new
serverMode
, that will allow task to be ran on both sides?The text was updated successfully, but these errors were encountered: