This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-12-18
Channels
- # adventofcode (1)
- # bangalore-clj (1)
- # beginners (118)
- # boot (39)
- # cljs-dev (6)
- # cljsrn (1)
- # clojure (62)
- # clojure-mke (1)
- # clojure-nl (6)
- # clojure-russia (51)
- # clojure-spec (8)
- # clojure-uk (9)
- # clojurescript (101)
- # code-reviews (1)
- # cursive (2)
- # datascript (9)
- # datomic (80)
- # emacs (4)
- # hoplon (27)
- # jobs-discuss (1)
- # off-topic (1)
- # om (1)
- # onyx (18)
- # protorepl (2)
- # re-frame (13)
- # reagent (13)
- # rum (9)
- # test-check (23)
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: https://gist.github.com/pbaille/67e0314f0dac251bdc0aefc7233460fc any advices would be welcome
I’m also wondering if anyone has tried to adapt https://github.com/binaryage/pure-frame for rum, I think it should be useful
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": https://guide.elm-lang.org/reuse/