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

How to use the signals crate standalone? Please add an example for this #3565

Open
coolbluewater opened this issue Jan 14, 2025 · 2 comments
Labels
documentation Improvements or additions to documentation signals Related to the signals crate

Comments

@coolbluewater
Copy link

The signals crate docs seem to indicate that it can be used for general reactivity, not just in the context of a dioxus-launched app.
I expect it's just a matter of setting some runtime context before calling 'use_signal`, but could not find any examples showing how to do this.

Appreciate if you can add an example showing how to do this, or just respond in this thread.

@ealmloff ealmloff added documentation Improvements or additions to documentation signals Related to the signals crate labels Jan 14, 2025
@ealmloff
Copy link
Member

Signals are only usable within the dioxus runtime. I don't see anything in the readme about using dioxus-signals outside of dioxus, but if there are other docs pointing to that, they are out of date and should be removed. Generational-box is the copy runtime behind signals which can be used outside of dioxus

@coolbluewater
Copy link
Author

My flawed surmise was due to not seeing an explicit connection to the dioxus runtime.
Is there a heavy dependence on the dioxus runtime? What does 'signals' need, conceptually speaking, from its environment?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation signals Related to the signals crate
Projects
None yet
Development

No branches or pull requests

2 participants