This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-08
Channels
- # admin-announcements (3)
- # arachne (1)
- # aws (2)
- # beginners (10)
- # boot (287)
- # cider (5)
- # clara (2)
- # cljs-dev (150)
- # cljsjs (2)
- # clojure (99)
- # clojure-austin (1)
- # clojure-brasil (1)
- # clojure-dev (13)
- # clojure-greece (55)
- # clojure-japan (1)
- # clojure-nl (2)
- # clojure-russia (24)
- # clojure-spec (184)
- # clojure-taiwan (1)
- # clojure-uk (45)
- # clojurescript (55)
- # clojurex (1)
- # cursive (20)
- # datascript (16)
- # datomic (1)
- # devcards (4)
- # events (10)
- # figwheel (1)
- # funcool (7)
- # hoplon (48)
- # immutant (1)
- # jobs (6)
- # lambdaisland (2)
- # lein-figwheel (19)
- # mount (36)
- # off-topic (37)
- # om (16)
- # om-next (17)
- # onyx (29)
- # planck (53)
- # proton (1)
- # pure-frame (1)
- # re-frame (40)
- # reagent (44)
- # remote-jobs (1)
- # ring (2)
- # robots (2)
- # rum (5)
- # slack-help (4)
- # spacemacs (27)
- # specter (82)
- # test-check (18)
- # test200 (1)
- # untangled (17)
So, with the new reagent 6.0, subscriptions are executed asynchronously? Is re-frame going to use the track
functionality?
https://reagent-project.github.io/news/news060-alpha.html
Don’t think there’s any plans for switching to it immediately, it’s pretty similar to what we do already in re-frame, and I’m not sure how it would work with dynamic subscriptions
If there was a benefit to switching would be happy to hear it though
@seantempesta: there's no change to the way that subscriptions happen in 6.0, other than they will be de-duplicated which is really just an under-the-covers efficiency thing. subscriptions have always been asynchronous, and that contniues.
track
is sugar over reaction
. But we won't be using it.
We're looking at adding a more re-frame specific sugar https://github.com/Day8/re-frame/issues/170 if we get it right you don't even have to know about track
or reaction
Hey guys, just about ot get started with our first re-frame app. Is there a good resource outside of the documentation on how to “get started”?
(the docs are incredible, but just curious if there is anything else out there too to supplement)
@erichmond: would a couple of tiny apps that use the lein re-frame-template help? https://github.com/fasiha/zip-code-re-frame & https://github.com/fasiha/re-simple-term
I found it was not too intimidating to make a bare-bones lein re-frame-template app, and just start adding slots to default-db
in db.cljs, add subscriptions to those slots in subs.cljs, make bigger views in views.cljs and matching handlers in handlers.cljs
My only big obstacle with using re-frame-template was that it used Figwheel as a backend when you request it add Compjure via +handler
, and for someone who's never set up their own http-kit/Ring/Compojure server, it was a lot of work to figure out how to get that going.
But I can't really blame re-frame-template for not being super-supportive of backends right
I'm a beginner tho, there's definitely different/better ways to do even those small apps. Like in the zip-code-re-frame views.cljs, I see I hadn't learned how to name variables to differentiate between subscriptions (ratoms) versus values. Nowadays I wouldn't have main-panel
get subscriptions just to hand them off to a sub-component (which could get it itself, better separation of concerns).
i found skimming through fractalify was helpful as well: https://github.com/madvas/fractalify/
Heretical question: is there any way in Chrome/Firefox JS Console to get access to the current app-db? To look at a JS value stored inside it without going thru cljs REPL (lacking tab completion) or heaven forbid change it in a pinch?
@fasiha: yes there is re_frame.db.app_db
. As you can see objects are not kebab-case anymore in JS land, for this king of thing I'd also recommend cljs-devtools
or dirac
Hi. I am trying to use re-frame-tracer
with re-natal but cannot enable the tracing with clairvoyant.core.devmode
Here is excerpt from project.clj: `:profiles {:dev {:dependencies [[figwheel-sidecar "0.5.0-2"] [com.cemerick/piggieback "0.2.1"]] :source-paths ["src" "env/dev"] :cljsbuild {:builds {:android {:source-paths ["src" "env/dev"] :figwheel true :compiler {:output-to "target/android/not-used.js" :main "env.android.main" :output-dir "target/android" :closure-defines {"clairvoyant.core.devmode" true} :externs ["resources/public/vendor/js/react-native.ext.js"]`
js/clairvoyant.core.devmode
is false
@erichmond: my big tip for getting into cljs would be to use cljs-devtools!!!!! And dirac (slightly more setup)
@richiardiandrea: "kabab-case" !!! That's just brilliant. Your invention?
ahhaha no no isn't that a thing? lol 😄
trying to follow the jargon 😉
and look professional ah ha
Buzz-word compliance is very important
I now have a new one
But ... I am left wondering ... if this-is-kebab case then what_is_this ?
have a look here, it is a thing (and this lib is useful!) https://github.com/qerub/camel-snake-kebab
I know my mind was blown as well
SCREAMING_SNAKE_CASE is the best lol
I feel my life has taken a small but important step forward.
@johnpeters: odd. What you have there seems right.