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

Make use_websocket not depend on reactive owners #217

Open
mscofield0 opened this issue Jan 4, 2025 · 2 comments
Open

Make use_websocket not depend on reactive owners #217

mscofield0 opened this issue Jan 4, 2025 · 2 comments

Comments

@mscofield0
Copy link
Contributor

If you don't have a WebSocket being initialized in some sort of root component, and instead you spawn them off in some effect, then you have no way of controlling the socket's lifetime. It would be best for use_websocket to have an additional Arc-like version of itself where the lifetime is controlled by reference counting, and not by the lifetime of its reactive owner.

@mscofield0
Copy link
Contributor Author

This also goes for other such utilities, to be honest, but I'm interested only in use_websocket for the moment.

@maccesch
Copy link
Contributor

maccesch commented Jan 4, 2025

Makes sense. When I find some time I'll investigate how to do this best.

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

2 participants