This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-08-10
Channels
- # aleph (3)
- # architecture (3)
- # bangalore-clj (5)
- # beginners (75)
- # boot (75)
- # cider (2)
- # cljs-dev (48)
- # cljsjs (3)
- # cljsrn (17)
- # clojure (125)
- # clojure-belgium (1)
- # clojure-boston (1)
- # clojure-italy (20)
- # clojure-losangeles (2)
- # clojure-spec (73)
- # clojure-uk (34)
- # clojurescript (127)
- # cursive (8)
- # data-science (5)
- # datascript (128)
- # datomic (5)
- # emacs (4)
- # events (3)
- # fulcro (1)
- # jobs (1)
- # jobs-discuss (4)
- # jobs-rus (9)
- # keechma (79)
- # lein-figwheel (2)
- # leiningen (2)
- # lumo (31)
- # om (1)
- # parinfer (61)
- # pedestal (1)
- # planck (1)
- # portkey (31)
- # re-frame (34)
- # reagent (53)
- # ring (3)
- # ring-swagger (13)
- # rum (1)
- # spacemacs (14)
- # testing (1)
- # yada (2)
Are there any tutorials / walkthroughs for re-frame that are recommended?
I am biased but I like this one: https://purelyfunctional.tv/guide/re-frame-building-blocks/
Thanks @ericnormand , I was actually looking at your courses for your birthday sale but forget to go back and check!
the re-frame components course goes on sale on monday
@josh_horwitz there is always /docs
in the repo?
if anyone knows why a GET from a file:/// based app for a relative file might fail with {:uri "index.edn", :last-method "GET", :last-error "", :last-error-code 0, :debug-message "No Error", :status 0, :status-text "Request failed.", :failure :failed}
i'd be all ears
hrmm... that's irritating... i need to use an AJAX get in development with Figwheel, but in deployment I'm looking at a relative file
I was tired of not finding the relevant re-frame docs (they are everywhere), so I made a dirty one md
file with all the official docs concatenated, great for ctrl-f
for specific keyword. There's no structure or anything, and it should probably be in the official repo in some capacity, but maybe someone else has the same problem: https://github.com/oskarth/re-frame-docs/blob/master/re-frame-one-doc.md
that's actually really useful
buggeryflip... it looks like you can't make an AJAX request from a file to another file... that probably makes sense from a security perspective (even if i might assume that allowing access to the same folder could make sense, but still) so i need to populate my DB at compile time
i'm sure that's possible, but i'm not sure how to do it, anyone know or seen an example?
@sandbags I’ve seen some online tutorials about client-side dev that just do npm install -g http-server
, and then use http-server
to serve their client files. Assumes you have nodejs installed, of course, but looks fairly painless otherwise
@manutter51 it's a nice idea thanks but doesn't work in my context
i guess if nothing else i can script something to compile my data into a .cljs file that gets included in the project
I think the build step would be less suprising...
If you use boot, you could maybe perhaps even use your existing clojure code to populate an edn file with the data in
I don't think I could load the EDN file though (since that's what I was trying to do in the first place)
In fact I've knocked up a quick ruby script to turn the data files into a CLJS file I can include in the project, it's imperfect, it means remembering to re-run it and rebuilding it when the data changes
Hi, I’m considering doing something like this to keep my server updated about interesting changes in my app-db
(add-watch (re-frame/subscribe :cart) :notify-server-of-cart-change
(fn [_ _ new-cart _]
(notify-server! :cart-change new-cart)))
if more experienced re-framers have an opinion for or against that technique, I’d love to hear it
@madstap A few weeks ago, you asked whether anyone was building re-frame apps using the finite-state machine approach described in a recent Cognitect blog post. My employer just green-lighted releasing our re-frame library for building apps in a similar way. You can check it out at https://github.com/Guaranteed-Rate/re-flow
@tessellator Nice! Gonna check that out tonight. Thanks for remembering
Thanks for your patience! I'd certainly be interested in your thoughts. 🙂
@sandbags To just read a edn file you could write a macro. Not sure about making figwheel pick up on changes to it, though.
;; util.clj
(defmacro compile-time-slurp [path]
(slurp path))
;; db.cljs
(def db (edn/read-string (compile-time-slurp "foo.edn")))
in re-frame form-2 components, should I keep my subscriptions in the outer fn or the inner fn?
either way is fine these days AFAIK