This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-10-31
Channels
- # aleph (12)
- # announcements (4)
- # asami (7)
- # babashka (20)
- # beginners (92)
- # calva (74)
- # clj-kondo (8)
- # cljdoc (70)
- # clojure (47)
- # clojure-dev (29)
- # clojure-europe (27)
- # clojure-nl (7)
- # clojure-norway (3)
- # clojurescript (7)
- # cursive (2)
- # datomic (1)
- # emacs (8)
- # events (5)
- # fulcro (36)
- # gratitude (4)
- # humbleui (25)
- # introduce-yourself (1)
- # lsp (26)
- # malli (6)
- # missionary (8)
- # nbb (50)
- # off-topic (9)
- # pathom (2)
- # pedestal (3)
- # portal (32)
- # practicalli (5)
- # reitit (5)
- # releases (1)
- # ring (6)
- # shadow-cljs (87)
- # sql (31)
- # tools-deps (26)
- # vim (3)
- # xtdb (15)
I have been iterating on new features of my subscriptions library (originally extracted from re-frame)
https://github.com/matterandvoid-space/subscriptions
and have some major additions:
- support subscriptions that are just functions (defsub API), you can subscribe to the function directly and
invoke them which will return the current value (no need to deref!)
- support layer2 subscriptions that are Reagent Cursors getting rid of the needless re-running of all layer2 subs when app-db is swap!'d
- Given a Fulcro component, automatically create subscriptions that will fulfill arbitrary
EQL queries for that component (and any nested components).
- recursive EQL joins can have an arbitrary transformation function and an arbitrary
expansion function to easily pull only parts a component graph
- this support works on top of any Clojure database with an entity
API, in addition to working on the frontend cljs.
- Performant react hooks integration, subscription arguments are memoized by default for you, all subscriptions used by a component are cached until the component is unmounted.
- use react context so that you don't have to pass through your app-db to your entire component tree.
check the cljdoc output for a more pleasant reading experience:
Readme: https://cljdoc.org/d/space.matterandvoid/subscriptions/2022.10.29/doc/readme
EQL docs: https://cljdoc.org/d/space.matterandvoid/subscriptions/2022.10.29/doc/eql-queries-via-subscriptions
React Hooks docs: https://cljdoc.org/d/space.matterandvoid/subscriptions/2022.10.29/doc/react-hooks-subscriptions
My main motivation is constructing a library to be used with fulcro to allow for large scale
cljs web application development, by combining the best parts of fulcro with those from re-frame.
To test out this integration, I have a todomvc clone that uses fulcro for app-db, mutations, and transactions, helix for rendering and using the subscription hooks and pathom + datalevin for a backend, plus using malli function instrumentation in clj+cljs.
https://github.com/matterandvoid-space/todomvc-fulcro-subscriptions
Looking forward to hearing any thoughts or feedback!

@U051V5LLP I think https://github.com/matterandvoid-space/todomvc-fulcro-subscriptions is private, as I'm seeing a 404
@U05476190 thanks! () fixed it