-
Notifications
You must be signed in to change notification settings - Fork 11
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
Dynamic optional view #28
Comments
For reference my hacky solution right now looks like this
And the create of that Unwrap wrapper of Option looks like
|
I've run into this issue as well, and have resorted to similar ugly workarounds. The basic problem is that normally, view states (that is, the associated type The cleanest solution, for now, is to wrap the optional view in The downside is that this has an extra cost of boxing and type checking. For Quill, because the view hierarchy is re-created every update, it's designed to be cheap - it's just filling in slots in a giant tuple. For |
Being able to use
Option<View>
as a view is very convenient but does not allow for the state Some/None to change. Being able to dynamically change this would be really useful.I've been able to emulate something like this by stitching
Cond
together with a helperUnwrap
ViewTemplate. So looks pretty doable to me but I've yet to fully wrap my head around the state tracking in quill works.The text was updated successfully, but these errors were encountered: