This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-04-06
Channels
- # architecture (2)
- # aws (6)
- # bangalore-clj (3)
- # beginners (7)
- # boot (29)
- # cider (26)
- # cljs-dev (52)
- # cljsrn (1)
- # clojure (249)
- # clojure-dev (9)
- # clojure-italy (2)
- # clojure-norway (3)
- # clojure-russia (178)
- # clojure-uk (30)
- # clojureremote (6)
- # clojurescript (91)
- # core-async (4)
- # cursive (8)
- # datascript (3)
- # datavis (1)
- # datomic (6)
- # emacs (3)
- # figwheel (2)
- # hoplon (14)
- # incanter (6)
- # luminus (8)
- # mount (7)
- # off-topic (22)
- # om (25)
- # onyx (41)
- # pedestal (7)
- # re-frame (9)
- # ring (1)
- # spacemacs (4)
- # sql (1)
- # uncomplicate (1)
- # unrepl (37)
- # untangled (90)
- # yada (77)
I have a function that does some data manipulations and returns {:value ,,, :remote ,,,}
, it’s kind of “generic” it fits for most of the cases. I call it from my “read” methods, e.g:
(defn app-data-read [env k params] ,,,,,
{:value ,,, :remote ast})
(defmethod read :foo
[env k params]
(app-data-read env k params))
now what if in another method I need to reuse the output of add-data-read and manipulate some more?
how do I do that? Maybe it’s just wrong to have the sort of “indirection” as app-data-read
?
because something like this won’t work:
(defmethod read :bar
[env k params]
(let [v (app-data-read env k params)]
(assoc-in v [:value :data :bar-data] 42)))
as long as it’s a pure function it shouldn’t matter how many function calls there are
hello, I'm having an issue with advanced compilation, this is the error: Rl {message: "Invalid join, {:app/search-form nil}", data: n, ag: null, name: "Error", description: undefined…}
it seems like I can't get the query after advanced compilation, when I try (js/console.log "Root" (pr-str (om/get-query Root)))
, it returns nil
for the query
is there any known caveat about this on advanced compilation?
wilkerlucio: are you doing anything fancy with your cljs build process?
@matthavener I don't think so, this is what my compilation setup looks like:
{:id "production"
:source-paths ["src/client"]
:jar true
:compiler {:asset-path "js/prod"
:main mortician-gui.main
:optimizations :advanced
:output-dir "resources/public/js/prod"
:output-to "resources/public/js/mortician_gui.min.js"}}
ah ok, there’s a known bug that breaks get-query
if you build after requiring om.next
but that doesn’t look like its happening there
what you mean building after requiring om.next
?
I think the bug also assert
s on get-query
anyways, I don’t remember it returning nil
ah like if you run the cljs builder inside the JVM after doing other things. Instead of running it via lein-cljsbuild
also, if I try to (om/query Root)
it get's me Uncaught Error: No protocol method IQuery.query defined for type function: function (){React.Component.apply(this,arguments);this.state=null!=
Are there any examples of SSR with compassus besides the tests.cljc file in the compassus repo?
@devo I don’t think so, no
BTW, Compassus SSR doesn’t work with the very last Om Next release
so you need to use alpha47 for now
I’ve been meaning to look into that, but still haven’t had the time