This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-08-06
Channels
- # bangalore-clj (7)
- # beginners (51)
- # bigdata (1)
- # cider (97)
- # cljsjs (2)
- # clojure (41)
- # clojure-dev (2)
- # clojure-dusseldorf (5)
- # clojure-nl (16)
- # clojure-russia (43)
- # clojure-spec (13)
- # clojure-uk (59)
- # clojurescript (24)
- # community-development (16)
- # datomic (18)
- # defnpodcast (1)
- # editors (96)
- # figwheel-main (6)
- # fulcro (13)
- # jobs-discuss (2)
- # jobs-rus (8)
- # off-topic (8)
- # onyx (11)
- # pedestal (3)
- # re-frame (18)
- # reitit (2)
- # shadow-cljs (158)
- # spacemacs (7)
- # tools-deps (3)
- # vim (3)
hi all, hoping you can help me find what it is i’ve missed here - i’ve been hacking around in devcards and put together a component that i want to bring into my app as a routed page - i’ve added the necessary idents and queries to be able to route to it from the application root, and i can see a mutations (triggered by a transaction from the component) changing the db inside the page node, but the component isn’t being re-rendered - it worked fine mounted as the root in a devcard - what else do i need to do to trigger renders now that it’s mounted as a page in a router?
What component are you running the transaction against? Is is the component that is rendering the router?
@j1mr10rd4n Does it render if you set the :render-mode
so that there should be no rendering problems: (reset! app (fc/new-fulcro-client :reconciler-options {:render-mode :keyframe}))
?
Hey all, I’ve a question regarding the yahoo.intl-messageformat-with-locales: in the fulcro-template that is required in client.cljs, and that also works. When I do the same in my own project, it won’t compile. The fulcro book says ” If you want to use Yahoo’s FormatJS, then you’d add the FormatJS library as a script in your HTML”, but that is not done in the template. Where does it come from in the fulcro-template project, i.e. where is defined that it should load/include that?
@liesbeth i think i came across that problem and a solution when i had a go at bumping the fulcro-template dependency versions - have a look at the diff here https://github.com/fulcrologic/fulcro-template/pull/10/files
i added intl-messageformat-with-locales.min.js
to the resources folder and a corresponding link in the SSR html template
@j1mr10rd4n Do you have a routing tree and make-route
entries for all the possibilities? Are you starting off with a (r/route-to ...)
to get there in the first place?
i also found the answer to my earlier question… I needed to change the path in the mutation to reflect the component’s new location as the child of a union query. In the devcard the mutation was swapping a state key at the top level e.g. (swap! state assoc-in [:selected-widget] name)
but as a child element that key would now be (swap! state assoc-in [:widgets :page :selected-widget] name)
for a page router with [:widgets :page]
here’s a quick gist https://gist.github.com/j1mr10rd4n/2daa9d6a2cf75eb0d4557046dbab973a#file-widgets-cljc-L34
thanks for the suggestions though