This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-10-19
Channels
- # announcements (7)
- # aws (4)
- # aws-lambda (1)
- # babashka (19)
- # beginners (60)
- # calva (9)
- # chlorine-clover (3)
- # cider (15)
- # clj-kondo (17)
- # clojure (34)
- # clojure-czech (1)
- # clojure-europe (96)
- # clojure-nl (2)
- # clojure-uk (46)
- # clojurescript (20)
- # css (4)
- # cursive (58)
- # data-science (3)
- # datascript (3)
- # datomic (42)
- # depstar (30)
- # dirac (4)
- # emacs (1)
- # etaoin (5)
- # events (1)
- # figwheel-main (30)
- # fulcro (6)
- # helix (9)
- # jobs (1)
- # lumo (3)
- # malli (27)
- # off-topic (15)
- # pathom (11)
- # programming-beginners (6)
- # reitit (6)
- # rewrite-clj (11)
- # shadow-cljs (14)
- # sql (1)
- # tools-deps (18)
- # utah-clojurians (3)
Just to clarify:
When I route to a form like this. The :pre-merge
hook will run when the component is initialized by the router. So for example on page load.
So instead, I should call (fs/add-form-config)
in the`:post-mutation` hook of :will-enter
. Is that correct?
I'm asking because what I observe right now, is that I only end up with a single form with my initial-state, because :pre-merge
runs only once on page load.
I’ve always done fs/add-form-config*
in the post mutation. For example, fetch some thing via df/load, then in the post-mutation have something like edit-your-data
mutation that threads fs/add-form-config*
into the state.
Alright thanks! That's exactly what I'm doing now.
(defmutation NodeWillEnter [{:keys [target]}]
(action [{:keys [app state]}]
(swap! state (fn [s] (-> s
(fs/add-form-config* SelectedNode target)
(assoc-in [::SelectedNode] target))))
(dr/target-ready! app target)))
Seems to work well for nowi'm using fulcro 2.8.13 in a web-app that composes many small Fulcro apps.
is it possible, given a handle to a mounted Fulcro app (i.e., the return value of fulcro.client/make-fulcro-client
) to query into its normalized data, from an external (non-Fulcro) context?
i see i can get access to the internal DB state atom by passing the app's :reconciler
to fulcro.client.primitives/app-state
-- that should work well enough for my purposes (something of a temporary migration-phase bridge between fulcro-land and other, that won't last very long)