-
-
Notifications
You must be signed in to change notification settings - Fork 84
allow _signal
functions to take Option
#186
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
Comments
_signal
functions to take None
_signal
functions to take Option
Wouldn't you have to request such a signature change from the future_signals crate? |
@NeverGivinUp no it should be managed at the Zoon level |
It isn't allowed because I almost don't need it in my code and mainly because it makes the types too complex for both compiler and human. So I didn't want to introduce some dummy structs or helper functions or traits to make it work. But I've created an example in this repo to demostrate potential problems and we can use it to try to design better API to resolve the issue. The example: https://github.com/MoonZoon/MoonZoon/blob/main/examples/signal_params/frontend/src/main.rs |
edit: nvm, |
Uh oh!
There was an error while loading. Please reload this page.
it's super convenient that functions like
.item/.layer
etc. takeIntoOptionElement
because it enables deciding emptiness inline e.g.but the
_signal
functions (including those for styles) don't allow such a pattern so one must do eitheror
which are far less ergonomic, instead i should be able to simply do
The text was updated successfully, but these errors were encountered: