Fork me on GitHub
#re-frame
<
2016-06-08
>
seantempesta01:06:29

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

danielcompton02:06:54

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

danielcompton02:06:25

If there was a benefit to switching would be happy to hear it though

mikethompson02:06:41

@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.

mikethompson02:06:55

track is sugar over reaction. But we won't be using it.

mikethompson02:06:17

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

erichmond16:06:37

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”?

erichmond16:06:57

(the docs are incredible, but just curious if there is anything else out there too to supplement)

fasiha16:06:50

@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

erichmond16:06:03

sure! thanks!!

fasiha16:06:15

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

fasiha16:06:14

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.

erichmond16:06:35

I’ve done that before

fasiha16:06:41

But I can't really blame re-frame-template for not being super-supportive of backends right

erichmond16:06:46

I’m pretty well versed in clj, first foray into cljs

fasiha16:06:52

Lucky 😄 !

erichmond16:06:03

thank you for the repos tho! these will be amazingly helpful!

fasiha16:06:22

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).

caio17:06:16

i found skimming through fractalify was helpful as well: https://github.com/madvas/fractalify/

fasiha17:06:00

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?

richiardiandrea18:06:14

@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

johnpeters20:06:49

Hi. I am trying to use re-frame-tracer with re-natal but cannot enable the tracing with clairvoyant.core.devmode

johnpeters20:06:44

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"]`

johnpeters20:06:11

js/clairvoyant.core.devmode is false

mikethompson22:06:30

@erichmond: my big tip for getting into cljs would be to use cljs-devtools!!!!! And dirac (slightly more setup)

mikethompson22:06:48

@richiardiandrea: "kabab-case" !!! That's just brilliant. Your invention?

richiardiandrea22:06:39

ahhaha no no isn't that a thing? lol 😄

richiardiandrea22:06:53

trying to follow the jargon 😉

richiardiandrea22:06:11

and look professional ah ha

mikethompson22:06:37

Buzz-word compliance is very important

mikethompson22:06:45

I now have a new one

mikethompson23:06:36

But ... I am left wondering ... if this-is-kebab case then what_is_this ?

richiardiandrea23:06:46

have a look here, it is a thing (and this lib is useful!) https://github.com/qerub/camel-snake-kebab

richiardiandrea23:06:04

I know my mind was blown as well

richiardiandrea23:06:24

SCREAMING_SNAKE_CASE is the best lol

mikethompson23:06:29

I feel my life has taken a small but important step forward.

mikethompson23:06:37

@johnpeters: odd. What you have there seems right.