This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-07-08
Channels
- # aws-lambda (3)
- # beginners (27)
- # boot (4)
- # cljs-dev (26)
- # clojure (7)
- # clojure-spec (8)
- # clojure-uk (17)
- # clojurescript (1)
- # core-typed (2)
- # data-science (53)
- # datomic (24)
- # emacs (1)
- # fulcro (7)
- # luminus (1)
- # off-topic (2)
- # onyx (3)
- # pedestal (5)
- # planck (2)
- # portkey (50)
- # re-frame (15)
- # reagent (5)
- # reitit (2)
- # shadow-cljs (19)
- # tools-deps (15)
- # vim (2)
This app should work?
(defonce client (atom (fc/new-fulcro-client :networking (net/fulcro-http-remote {:url "//localhost:8080/api"})
:started-callback (fn [app] (df/load app :app/data views/Root)))))
I can see the transit request/reponse and both are ok
I have a (prn feed)
on render so I can see that app dont re-render after the request
the request query is something like [{:app/data [{:app/feed [:feed/id]}]}]
and the response {:app/data {:app/feed [{:feed/id 1}]}}
sometimes app/feed
was printed as {}
Repo to reproduce https://github.com/souenzzo/my-next-stack/blob/master/src/client/views.cljs#L40
@souenzzo I’m not sure what you’re trying to do here…you’re not leveraging the actual query engine…this example is broken in a number of ways
1. The default URI is “/api”. Specifying a complete URL is not recommended. 2. You should be using initial app state if you want to pre-populate some items for demo purposes, not some global tree of data you plug in in the middle
3. Your load is targeting :app/data on the root db node, but that isn’t what you query for
About 1, i understand, I'm not developing an app form scratch. I want to add a fulcro frontend in a existing app. Not so easy to get /
and /api
from the main domain.
About 2, I dont want initial state. that state is just for test if the render is ok
About 3, i need to make (prim/tree->db Root data)
work, right?