nosco / hx

A simple, easy to use library for React development in ClojureScript.
MIT License
249 stars 16 forks source link

Reducers dont support Multimethods #51

Closed gavlooth closed 5 years ago

gavlooth commented 5 years ago

Recently i had to do the following https://i.imgur.com/DMGUjlt.png The reason is that multimethods are not actually js functions but rather objects implementing the Ifn protocol so in order to be used as reducers one has to call them from within an actual function I think the same is true for keywords, sets and maps. It would be a good enhanchment to be able to use them as reducers without having a top level wrapper function

lilactown commented 5 years ago

Thanks for filing the issue! Should be fixed in 1c9476099703b264fa460e67e733a39d70913692

lilactown commented 5 years ago

I've published version 0.5.2. Can you give it a shot and see if it fixes this problem?

gavlooth commented 5 years ago

Sure. I will ping you as soon as

gavlooth commented 5 years ago

Works like a charm!!!