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

Component lifecycle #24

Merged
merged 2 commits into from Mar 16, 2021
Merged

Component lifecycle #24

merged 2 commits into from Mar 16, 2021

Conversation

lukechu10
Copy link
Collaborator

@lukechu10 lukechu10 commented Mar 8, 2021

Fixes #21

Adds support for the on_cleanup hook. on_cleanup is tied to the reactive scope. When the reactive scope (aka Owner) is dropped, all the cleanup callbacks are called. Components are created in a new reactive scope so calling on_cleanup inside a component will trigger the callback when the component is destroyed.

@lukechu10 lukechu10 added A-components Area: components and UI abstraction C-enhancement Category: new feature or improvement to existing feature S-blocked Waiting on another issue/PR labels Mar 10, 2021
@lukechu10
Copy link
Collaborator Author

Blocked by #37

@lukechu10 lukechu10 removed the S-blocked Waiting on another issue/PR label Mar 12, 2021
@lukechu10 lukechu10 closed this Mar 16, 2021
@lukechu10 lukechu10 reopened this Mar 16, 2021
@lukechu10 lukechu10 marked this pull request as ready for review March 16, 2021 16:16
@lukechu10 lukechu10 merged commit 60d433f into master Mar 16, 2021
@lukechu10 lukechu10 deleted the component-lifecycle branch March 16, 2021 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-components Area: components and UI abstraction C-enhancement Category: new feature or improvement to existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Component lifecycle
1 participant