Skip to content
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

Pre resolve an asyncComponent when another component resolves #43

Open
georgehenderson opened this issue May 5, 2017 · 3 comments
Open

Comments

@georgehenderson
Copy link

georgehenderson commented May 5, 2017

Thanks for building this package, it was simple to implement.
I'm looking for suggestions on the best way to resolve an async component from another async component. I basically want to preload another component path after another resolves. This is just an optimization to remove the loading on a path users are likely to take next. Since they are just components, I guess I could pre initialize the next component in componentDidMount of the resolved component. Any other ideas?

It might be nice to have a built in mechanism for this like:

asyncComponent({
  ...
  thenResolve: [AnotherAsyncComp, AnotherAsyncComp2]
})
@georgehenderson
Copy link
Author

georgehenderson commented May 6, 2017

Or maybe more generic like:

asyncComponent({
  ...
  onResolve: () => AnotherAsyncComponent.resolve()
})

@theodesp
Copy link

This would be a great feature as currently I would like to avoid using onLoading

@tarun7886
Copy link

Is this functionality implemented by any mean??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants