Fork me on GitHub

Hi, i’m trying to make a mixin to facilitate communication between child and parent component in rum, it is using core.async for the communication, it is just 50 lines of code minus the detailed/explained example: any advices would be welcome


I’m also wondering if anyone has tried to adapt for rum, I think it should be useful


@pbaille why would you do that (mixin)?


your question is about pure-frame or my gist mixin?


for pure-frame: because re-frame minus global state sounds amazing.


for my mixin: because when I’m trying to compose several components, my code gets messy with lots of callback and coordination.


@pbaille from my understanding of re-frame/pure-frame you'll still have a single state db in your app. So that you must not keep any business logic state/functions inside UI components. Instead all UI components must dispatch events "into the framework" to change the app db. On next tick the GUI will be redrawn accordingly to new db state.


Maybe you could use several instances of pure-frame to talk with each other...


There's currently an interesting trend going in Elm against such patterns. They promote splitting functions instead of extracting "components":