-
Notifications
You must be signed in to change notification settings - Fork 472
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
[Fix] Improved loading #700
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small nit, but otherwise great. Quick question though: does this remove wasm loading until after the react components load?
Co-authored-by: Mike Turner <mturner@aleo.org> Signed-off-by: Brent C <brent.conn@gmail.com>
@iamalwaysuncomfortable No it doesn't the worker still triggers the wasm download before the react components mount so it's no slower to download. The main difference here is just that we are waiting until the worker is ready (i.e. for the wasm to download) before we allow the app to render the main route. It's kind of a quick hack but it should fix the slow connection white screen which seems to be caused by the app rendering before the wasm is done initiating. In future issues/as part of some of the SDK improvements I have some ideas for properly managing the worker and the wasm to make it easier to navigate and optimal for render speed. |
Motivation
Resolves #681
Sets some ground work for #693: context provider added to ensure app doesn't load until worker is done initializing; this context can eventually be used for worker management (and maybe eventually moved to the TS SDK).
This issue will be iterated on in #693 and #596. This PR is just meant to be a quick fix to resolve the app not loading in some conditions.
Test Plan
Functionality should be identical but app shouldn't need a refresh on mobile or slow connections. Should see spinner while initial assets are loading.
Preview link: https://improved-loading--aleo-tools-3481ab.netlify.app/