-
-
Notifications
You must be signed in to change notification settings - Fork 380
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
feat: support reactive dynamic loadable #330
Conversation
@theKashey could you review it please? |
I would like to make it a bit more complex:
This would be needed only for Oh, it really could become a bit complicated. |
It is not the responsibility of this component, it could be done in userland I think.
Yeah you are right!
Yes you are right, I think |
acf69d0
to
d394947
Compare
d394947
to
5abb4bb
Compare
5abb4bb
to
8c07cae
Compare
Glad this got in! I'm trying to implement keeping the old component mounted while loading in userland and it works fine, however one issue I cannot seem to move past is that there is always a I'd expect a seamless switch between them, like:
But currently it goes:
Even if both CompA and CompB were previously loaded. If using loadable.lib, then the children-as-a-function prop gets "skipped" for a brief moment until the next render (which happens immediately). This causes problems with animations because it unmounts/mounts the whole tree under loadable.lib. Just wanted to point this out for future readers seeking a solution to this, I understand fixing this may be a bit more complex than acceptable. |
Hello @luishdz1010, for now, yes it will switch to To display the previous component during loading, the strategy will be the same as a Transition Group. You have to check when the component will change and keep displaying the previous one until the new one is ready (fallback has disappeared). |
Closes #284