This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-07-31
Channels
- # announcements (1)
- # beginners (171)
- # cider (51)
- # clj-kondo (40)
- # cljsrn (5)
- # clojure (68)
- # clojure-dev (42)
- # clojure-europe (2)
- # clojure-italy (20)
- # clojure-spec (2)
- # clojure-uk (141)
- # clojurescript (19)
- # community-development (4)
- # core-async (17)
- # core-logic (3)
- # cursive (11)
- # data-science (1)
- # datomic (7)
- # defnpodcast (2)
- # figwheel (9)
- # figwheel-main (2)
- # fulcro (15)
- # graphql (21)
- # jackdaw (3)
- # joker (11)
- # juxt (1)
- # luminus (12)
- # off-topic (2)
- # pathom (73)
- # pedestal (2)
- # re-frame (41)
- # reagent (14)
- # reitit (4)
- # shadow-cljs (39)
- # tools-deps (4)
Is there anyway built in to Fulcro to conditionally load some data (i.e. profile/by-id
), if it already exists then don’t fetch. I could easily do this by checking the state before fetching but wasn’t sure if there was some kind of flag I’m not seeing in the book.
Fulcro never analyzes your state to determine your intention. Write a mutation that conditionally submits a load-action.
@njj there is a trick you can do if you are using pathom, with the data you send for the query you can also send the data you already have, so its like you start processing with that, its quite efficient, we do that to optimize some later data fetch. it would look like: [{([:customer/id 123] {:pathom/context {:customer/loaded-before "some-data"}}) [:customer/name :customer/loaded-before]}]
so anything in :pathom/context
would be considered pre-defined data, the server process will pick from that
you could also elide current data using :update-query
, the advantage of sending it (in case you are using pathom) is that if you need attributes that require some input to process, these inputs can be immediatly available, reducing the processing on the server
Hi guys, is there a way to start a api
server and keep it running directly via clojure
tool?
Here's my use-case:
I'd like to have a single command yarn start
which start the npx shadow-cljs watch :main
and the clojure -A:dev -J-Dtrace -J-Dghostwheel.enabled=true
with the initial start
command.
Something like using concurrently
in the NodeJS
world. An example of that would be, "setup": "concurrently \"cd server && yarn\" \"cd client && yarn\""
in the package.json
.
hey, curious if anyone is using any component libraries with fulcro that have worked well, I have been looking at antizer in particular to use ant design components with reagent, does anyone know if this would work with fulcro?
Hi @U12FDCE4V, sure it's possible to do so however, generally speaking the fulcro examples, template rely upon the semantic-ui
which has been wrapped accordingly here https://github.com/fulcrologic/semantic-ui-wrapper.
As for antizer
, I think it should be possible with some experimentation.
cool, thanks for the reply - I’ll check out semantic-ui and possibly play with pulling in antizer