Fork me on GitHub

I do this example


when i load this code to repl


(ns app.client
    [com.fulcrologic.fulcro.application :as app]
    [com.fulcrologic.fulcro.components :as comp :refer [defsc]]
    [com.fulcrologic.fulcro.dom :as dom]
    [com.fulcrologic.fulcro.algorithms.merge :as merge]
    [ :as targeting]))

(defsc Car [this {:car/keys [id model] :as props}]
  {:query [:car/id :car/model]
   :ident :car/id}
    "Model " model))

(def ui-car (comp/factory Car {:keyfn :car/id}))

(defsc Person [this {:person/keys [id name age cars] :as props}]
  {:query [:person/id :person/name :person/age {:person/cars (comp/get-query Car)}]
   :ident :person/id}
    (dom/div "Nameeee: " name)
    (dom/div "Age: " age)
    (dom/h3 "Carssssss")
      (map ui-car cars))))

(def ui-person (comp/factory Person {:keyfn :person/id}))

(defsc Sample [this {:root/keys [person]}]
  {:query [{:root/person (comp/get-query Person)}]}
    (ui-person person)))

(defonce APP (app/fulcro-app))

(defn ^:export init []
  (app/mount! APP Sample "app"))


  (reset! (::app/state-atom APP) {})

  (swap! (::app/state-atom APP) update-in [:person/id 2 :person/age] inc)

  (merge/merge-component! APP Person {:person/id   2
                                      :person/name "Bob"
                                      :person/age  21
                                      :person/cars [{:car/id    1
                                                     :car/model "F-150"}]}
                          :replace [:root/person])

  (app/current-state APP)
  (app/schedule-render! APP))


I got this error `Syntax error compiling at (src/app/client.cljs:14:3). No such var: com.fulcrologic.fulcro.dom/macro-create-element*`


Typo in the book. That function is in some other ns from 2.x to 3.x…pls indicate a link to the section of the book


Hi, I am trying to implement a progress update where the information is coming from the server. I have implemented an UISM as per suggestion from last Thursday/Friday and I can generate the events to set a timer and then generate a new event. But how can I force a reload of the data on an event?