Closed bendrucker closed 9 years ago
You should return a function
Hmm very interesting. I'm not so sure about this. Since this isn't a common or immediately recognizable pattern I'm leaning towards keeping the extra hook for readability.
Since this isn't a common or immediately recognizable pattern I'm leaning towards keeping the extra hook for readability.
Gave this some thought. While I definitely see the pros of something like observ()
, I'm going to keep it as is.
Thanks!!
See how observ is written (or ear for that matter). You should return a function that returns state when called w/out a listener, not provide extra hooks.