Once you need to stack a lot of reusable components, React Render props recalls a lot callback hells. And that’s when it clicked for us that we could also leverage CPS-like sugar for React as well. I recommend you to read our JS counterpart library (Epitath) that inspired this one here.

How to get it running in any project

If you are eager to get it running, look this working demo. If you want to setup in your own project now:

First run

$ npm install --save-dev jaredly/let-anything

Install bs-epitath

$ npm install bs-epitath

Then add the ppx flag to your and list bs-epitath to deps bsconfig.json

"bs-dependencies": [

...

"bs-epitath" ], "ppx-flags": ["let-anything/lib/bs/native/let_anything.native"],

Thanks to bsb-native and Ben’s work on it we are able to get the binary compiled in no time.

“But should I use this?”

We have been using it here at Astrocoders’s ReasonML projects for a couple of weeks for now and so far it’s feeling like heaven. We love living in the edge. And it also has already a way better performance than the JS counterpart as it doesn’t require using immutable generators. **AND THE TYPE INFERENCE JUST WORKS!**.

But we also feel that the idea stills need to mature a bit more and we’ll be leaving this as a PoC of what is possible to do for with ReasonML and React together as the community is discussing about including CPS sugar support built-in ReasonML itself.