-
Notifications
You must be signed in to change notification settings - Fork 35
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
22 tc39 observables #76
Conversation
…tyle subscribe So when a TC39 style `subscribe` call is made, we trigger with the current value immediately, contrasting with the prior behaviour - namely triggering only on changes to the state. tc39/proposal-observable#190
…er arguments This will be used by the JSX utility.
Now JSX binding arguments are known at the compile-time, so this ought to work: ```js get template () { return <div ko-text={this.someValue}></div> } ```
Sample: ```html <component x={alpha}></component> ``` … will be given `params={x: alpha}`
… observable/computed
I suggest that it be done with a new event type, which could also work with regular subscriptions. tc39 observables are just another way to consume a sequence of events. I don't think we should change the nature of that sequence based on the consumption technique. |
Thanks @mbest, I think that's a good idea. Did you have any specifics in mind? |
|
@mbest - You can see I've added in support for the TC39
{next:...}
style of argument tosubscribe
.I use the argument-type (i.e. an object with a
next
method) to detect whether it's TC39-compliant call, in which case the current value of an observable is emitted immediately/synchronously.It occurred to me that perhaps we want to have a different approach to this, such as adding a new event type (i.e.
state
instead ofchange
). Any thoughts?