This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-11
Channels
- # announcements (8)
- # beginners (17)
- # boot (1)
- # cider (20)
- # cljdoc (7)
- # cljs-dev (14)
- # clojure (62)
- # clojure-dev (16)
- # clojure-hamburg (1)
- # clojure-russia (2)
- # clojure-spec (22)
- # clojure-uk (15)
- # clojurebridge (1)
- # clojurescript (23)
- # core-async (4)
- # core-logic (17)
- # cursive (2)
- # datomic (4)
- # duct (1)
- # figwheel-main (40)
- # fulcro (15)
- # leiningen (1)
- # off-topic (27)
- # re-frame (3)
- # shadow-cljs (9)
- # specter (3)
- # sql (59)
you can find some more info in the fulcro README: https://github.com/fulcrologic/fulcro#version-differences
@chris.schreiner i don’t think there’s any better way to do it, i’m also doing something similar
but generating a sequence of :db/add
:db/retract
tuples based on the form state diff seems very straightforward no?
@currentoor right on, thanks. yea it's pretty simple, i was just curious
i know this is more a clojure thing, but what do you all do about circular dependencies? I'm finding it hard to organize my fulcro app in a natural way. Like I have some file with component definitions, and another file with mutations. The components need to require mutations to trigger them. But then I often need to reference a component in a mutation (for example to add-form-config). Do you just leave all related components and mutations in the same file?
Think requiering mutations to trigger them is just for "convenience". You can just do transact and add the full namespaced name there.
I have also been known to make an atom (e.g. in the mutation namespace), and then reset it to the component class at the component declaration. The component can then use aliases from the ns decl, and the mutation can just deref the atom to get the class.
You could also put your component classes in some kind of central registry (same technique…e.g. make a global map at some leaf of the ns graph that is keyed by symbol)
but as @U3LP7DWPR says: mutation calling is just data. The aliasing is convenient…so if you don’t want a registry kind of thing, just fully-qualify your mutation calls.
a simple option is keeping then at the same file, I found that having mutations closer to call site is often convenient
Guess I shouldn't say "often" - looking more closely, that's actually the only legitimate cause of dependency cycle. i was able to refactor everything else into a clean dep tree, but the add-form-config / component thing is still an issue for me
Hi, author of https://github.com/priornix/antizer here. How many guys are interested in a Fulcro port of Antizer?
2.6.0-RC6 is on clojars. This completes the React 16+ port. Still undergoing testing, but it is looking pretty solid so far.
I would be @priornix