hiebj / stately

elegant, type-safe state management
2 stars 1 forks source link

Subscription should call all functions passed as children #23

Closed hiebj closed 6 years ago

hiebj commented 6 years ago

Subscription in Subscribable.tsx checks to see if the passed children are a function, and if so, calls it. However, for some unfathomable reason, I decided to check arity (fn.length === 2) which means that any children that don't care about dispatch (the 2nd parameter) will not get called.

Remove the arity/length check in isSubscriberChildren().