Skip to content
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

observ/computed calles dependent observables immediatly #11

Closed
emilbayes opened this issue May 12, 2015 · 2 comments
Closed

observ/computed calles dependent observables immediatly #11

emilbayes opened this issue May 12, 2015 · 2 comments

Comments

@emilbayes
Copy link

I was a bit surprised that observ/computed tries to get the value of each of it's dependent observables upon initiation. This is contrary to how observ values themselves work. Or am I misunderstanding something?

@emilbayes emilbayes changed the title observ/computed calles dependencies immediatly observ/computed calles dependent observables immediatly May 12, 2015
@Raynos
Copy link
Owner

Raynos commented May 12, 2015

With observ you give it the initial value.

With observ/computed you give it a list of observables and it reads the value.

The important invariant here is that any observ must ALWAYS have a current value. For observ/computed to work it must get it's initial value; it only asks for the initial value again when the upstream observables changed.

@emilbayes
Copy link
Author

Alright, I must have misunderstood the part where observ differs from observable, but your answer makes sense. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants