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
You can also manually create a child scope to pass to the component in order to get one-way binding:
constappView=data=>{constChildScope=DefineMap.extend({// one way (to-parent) bind countsetcount(val){data.count=val;returnval;}});returnh('div',{},[h('h2',{},['Children']),h('a-counter',newChildScope())]);};
This is pretty cumbersome to do whenever you don't want two-way binding, so a better solution is probably out there.
By default, if you pass the
data
object to acan-component
it will two-way bind the current view and the component:You can also manually create a child scope to pass to the component in order to get one-way binding:
This is pretty cumbersome to do whenever you don't want two-way binding, so a better solution is probably out there.
Maybe something like
The text was updated successfully, but these errors were encountered: