-
Notifications
You must be signed in to change notification settings - Fork 24
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
Does not trigger with an initial value #7
Comments
It's been over a year, and no answer. Is this library abandoned ? |
If |
|
Yeah, that isn't great, because you then get
Right, selectors returning
I'm not sure I understand this proposal?
That's one possibility. Is it crazy to make an initial call only if
Sorry, I'm not understanding this bit |
Because of the
var currentValue = getValue(getState(), objectPath)
on initial call to the watch constructor, the change handler that you use to subscribe won't get called until the value has a first change.I don't want to duplicate my side effect logic by having an initial state, then a watch which performs the same logic, so I end up doing this:
It's strange that the current value is captured at the time the watch function is created, but the callback change function isn't run until the next time the state changes.
The text was updated successfully, but these errors were encountered: