You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The default behavior is that a binding has to be provided. There are not many places in the Editor where we have to repeatedly create bindings as most UIs are data driven and then use a generic inspector to create a default binding.
Some design decisions for this framework are to be verbose and explicit without a lot of assumptions. If we haven't already we might want to expose the attribute inspector control as well which makes creating inspectors just a matter of defining a simple json schema
Moreover the binding class has various properties as well like defining history related behavior, combining behavior etc. we also sometimes create new bindings as subclasses to perform more quirky or complicated tasks.
So while we could add some shortcuts we'd eventually have to expose all of the binding properties as arguments to the link function which would lead to more than one ways of doing something.
Did I mention we wanted one way to do something instead of multiple ways to do the same thing? 😄
Current API design has few helpers for binding in different ways, and then element has
link
method. So Label to data currently is:And for bi-directional:
Question:
Is this is necessary to provide classes for binding?
Proposal:
Here is example of how it could simplify for users the data binding:
For read-only data:
For bi-directional (by default):
For write only:
In JSX it will be:
And to
link
attributeread
and/orwrite
property can be provided:The text was updated successfully, but these errors were encountered: