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

[Full-stack Signals] add automatic unsubscription from the signal instance #2621

Closed
taefi opened this issue Jul 25, 2024 · 1 comment · Fixed by #2663
Closed

[Full-stack Signals] add automatic unsubscription from the signal instance #2621

taefi opened this issue Jul 25, 2024 · 1 comment · Fixed by #2663
Assignees
Labels
enhancement New feature or request hilla Issues related to Hilla

Comments

@taefi
Copy link
Contributor

taefi commented Jul 25, 2024

Describe your motivation

When a user is moving away from a view accessing/manipulating a Full-stack signal, the subscription for that instance should be terminated automatically to prevent memory leakage.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@taefi taefi added enhancement New feature or request hilla Issues related to Hilla investigation labels Jul 25, 2024
@platosha
Copy link
Contributor

Detecting subscribing and unsubscribing could be done using the S and U functions. See: preactjs/signals#351

@taefi taefi self-assigned this Aug 14, 2024
taefi added a commit that referenced this issue Aug 14, 2024
This also postpones subscribing to a signal
instance until the client-side signal is
actually being subscribed to (rendered).

Fixes #2621
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hilla Issues related to Hilla
Projects
None yet
2 participants