Yomguithereal/baobab-react

broken version 2.0.0-rc1

airtoxin opened this issue · 6 comments

newest baobab-react version 2.0.0-rc1 in npm was broken.

I use higherOrder function with babelify
import {root} from 'baobab-react/higher-order';
It causes Uncaught TypeError: Cannot read property 'root' of undefined

screenshot 2016-03-19 22 23 38

I think .default is unnecessity https://github.com/Yomguithereal/baobab-react/blob/new-version/higher-order.js#L1

Hello @airtoxin. I am awfully sorry but it seems I forgot to publish this RC version using the beta tag. If you want to use the version documented on the master branch you should install the 1.0.1 version using npm install baobab-react@1.0.1.

However, if what you want is to use the latest dev version I am currently brewing, I'll be happy to debug the issue with you at the beginning of the week.

1.0.1 works fine :)

I'm ok to debug

Hello again @airtoxin. I just published a new beta version of the v2. You can install it through:

npm install baobab-react@beta

If you want to upgrade, the docs can be found on the new-version branch here.

Basically, what changed is a simplification of the bindings and a more simple way to dispatch actions.

Hi @Yomguithereal. Sorry for delay.

I tried beta version, and got it. Uncaught Error: baobab-react/higher-order.branch: given target is not a valid React component..
My application works fine in version 1.0.1

Ahh I see.
higher-order function changes interfaces from branch(Component, cursors) to branch(cursors, Component).
I fixed my application code, and works fine :)

Good to know :). I'll close the issue then. The reason why I change the args' order is so the higher-order function now respects functional programming's philosophy (currying notably and the free decorator that comes with it).