Fork me on GitHub
#fulcro
<
2018-05-08
>
wilkerlucio00:05:37

@currentoor I did some experiments, the setup is no too complicated, I did using shadow-cljs, and the performance is pretty good

myguidingstar03:05:57

I have a question about the example in "A Complete UI Routing Example" section of fulcro book

myguidingstar03:05:30

in Root, the link with transact to Report A looks like this:

(dom/a {:onClick #(prim/transact! this `[(r/route-to {:handler :status :route-params {:report-id :a}})])} "Status A")

myguidingstar03:05:40

and the Report component hardcoded that report-id (`:a`) in its initial state:

(defsc StatusReport [this {:keys [id]}]
  {:initial-state {:id :a :page :status-report}
   :query         [:id :page :label]}
  (dom/div {:style {:backgroundColor "yellow"}}
    (dom/div (str "Status " id))))

myguidingstar03:05:08

(the same to its sibling GraphingReport)

myguidingstar03:05:00

how do I modify StatusReport so it gets the report id from route params instead of hardcoded value?

myguidingstar04:05:33

never mind, I figured it out. I didn't load the data into app state

cjmurphy04:05:06

The source code documentation for fulcro.websockets/make-websockets states: "Anything injected as a dependency of this component is added to your parser environment (in addition to the parser itself)". Can anyone point me to where in the source this happens?

levitanong14:05:24

hi all, are there any known issues with using df/load-mutation or df/load-action with ptransact!?

thosmos19:05:42

I just changed the fulcro dep of an app from 2.3.0 to 2.5.3 and am getting the following error. :

Exception in thread "main" java.lang.ExceptionInInitializerError
	at clojure.main.<clinit>(main.java:20)
Caused by: java.lang.RuntimeException: No such var: fulcro.client.dom/macro-create-element*, compiling:(riverdb_ui/ui/user.cljc:14:5)
any ideas?

thosmos19:05:28

just saw the note in the guide:

IMPORTANT
If you’re writing your UI in CLJC files in 2.5, then you need to make sure you use a conditional reader to pull in the proper server DOM functions for Clojure:
(ns app.ui
  (:require #?(:clj [fulcro.client.dom-server :as dom] :cljs [fulcro.client.dom :as dom]))