pH200 / cycle-react

Rx functional interface to Facebook's React
MIT License
370 stars 18 forks source link

(fix) Interaction listeners called with multiple arguments #36

Closed sunny-g closed 8 years ago

sunny-g commented 8 years ago

This PR allows any interactions.listener to be passed multiple arguments, a requirement I faced when wanting to use the great react-autosuggest library.

sunny-g commented 8 years ago

Never mind, realized why this wouldn't work (onNext can only push in a single value into the Subject's assosciated Observable, and to support multiple would be problematic. The alternative is to use destructuring.

pH200 commented 8 years ago

Yes. And I think react-autosuggest use single argument in their event handlers as well. Just use object destructuring in the function parameter.