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

Multiple inicializations of initVM #1264

Open
gagdiez opened this issue Jul 24, 2024 · 0 comments
Open

Multiple inicializations of initVM #1264

gagdiez opened this issue Jul 24, 2024 · 0 comments
Labels
bug Something isn't working. Highlights a PR's description in the 'Fixes' changelog section

Comments

@gagdiez
Copy link
Collaborator

gagdiez commented Jul 24, 2024

Currently, the VM is re-initialized every single time the user changes pages. This is not only resource consuming, but also leads to weird errors where the components suddenly say "VM is dead" briefly before coming back to life.

This happens because the initNear is called each time the router.query changes:

}, [initNear, router.query]);

I do not understand the code, but I think that we are trying to inject some URL parameters into link elements?

Ideally, we would use initNear only once, since it is for initializing the VM, and figure out a different way to handle the URL params

@gagdiez gagdiez added the bug Something isn't working. Highlights a PR's description in the 'Fixes' changelog section label Jul 24, 2024
@gagdiez gagdiez mentioned this issue Jul 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working. Highlights a PR's description in the 'Fixes' changelog section
Projects
Status: NEW❗
Status: No status
Development

No branches or pull requests

1 participant