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

Handle LWC lifecycle propely #2

Open
bmblb opened this issue Jun 8, 2023 · 0 comments
Open

Handle LWC lifecycle propely #2

bmblb opened this issue Jun 8, 2023 · 0 comments

Comments

@bmblb
Copy link
Collaborator

bmblb commented Jun 8, 2023

There is a potential memory leak in the demo:

createCalendar() {
         window.calendar = new bryntum.calendar.Calendar({
             appendTo : this.template.querySelector('.container'),

window is shared between LWC therefore if Calendar components gets unloaded calendar will still hang in memory.

Therefore, we need to hook into LWC lifecycle:
https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.create_lifecycle_hooks_intro

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

1 participant