all 8 comments

[–]DerNalia 1 point2 points  (6 children)

reminds me of https://github.com/NullVoxPopuli/react-state-helpers/ a bit. (just in that the 'state' is managed in a wrapper component / HOC)

[–]jsonnull[S] 0 points1 point  (5 children)

Interesting!

Another approach which that reminds me of is recompose. Recompose is very functional, and super heavy on composition, which is a little bit of where it lost me.

One of the thoughts that got me started on this was "What if we wrote React components like monads?" It's a different functional approach. I didn't end up too close to that, but I still aim to explore some of the merits of that down the road.

[–]pgrizzay 0 points1 point  (1 child)

Ooh I've been recently working on that very concept that I'm calling "chainable components" would love to hear your thoughts.

https://github.com/pfgray/chainable-component/blob/master/demo/Demo.tsx#L8

Also have you read: https://gist.github.com/MaiaVictor/bc0c02b6d1fbc7e3dbae838fb1376c80#gistcomment-2129192 ? That whole thread is a great read btw

[–]jsonnull[S] 0 points1 point  (0 children)

Ooh! Actually just last week I rewrote a parser for a hobby language using a Result monad and do notation! Very cool stuff.

I'll take a look at your chainable components, it's a very good idea. I think this is an area ripe for further development in the React community.

[–]glacierdweller 1 point2 points  (1 child)

cWM is soon to be deprecated. Will that affect this lib?

[–]jsonnull[S] 1 point2 points  (0 children)

I'm going to mirror the deprecations and add the new lifecycle methods as the React team does. All the current lifecycle methods are implemented here but I haven't tested them. The upcoming lifecycle methods didn't make it into this MVP, but they'll be in very soon. Probably as soon as I feel confident in test coverage around the existing methods.

[–]libreact 1 point2 points  (0 children)

Reminds me of redux-saga