This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-05-18
Channels
- # admin-announcements (7)
- # arachne (24)
- # beginners (40)
- # boot (24)
- # braid-chat (22)
- # cider (8)
- # cljsrn (35)
- # clojure (32)
- # clojure-austin (1)
- # clojure-belgium (52)
- # clojure-russia (16)
- # clojure-sanfrancisco (1)
- # clojure-taiwan (2)
- # clojure-uk (25)
- # clojurescript (112)
- # core-async (3)
- # cursive (18)
- # data-science (1)
- # datascript (7)
- # datomic (30)
- # devcards (2)
- # dirac (12)
- # emacs (4)
- # flambo (1)
- # funcool (5)
- # hoplon (146)
- # jobs (9)
- # jvm (5)
- # off-topic (4)
- # om (141)
- # onyx (22)
- # re-frame (89)
- # reagent (86)
- # ring-swagger (31)
- # rum (3)
- # spacemacs (1)
- # specter (10)
- # untangled (112)
- # yada (3)
@lewix: welcome!
thank you for the invite @danielcompton
Good question!
It could be in a closure, but then everything in the whole app would need to pass that closure around to be able to have a reference to it in handlers, subscriptions, e.t.c.
There was some work done on this in https://github.com/Day8/re-frame/pull/107
It’s a pragmatic tradeoff. There is a small amount of global state, but it makes developing apps much easier
re-frame was designed for SPA’s so there is only ever one app running in the browser at one time
If you wanted to run multiple apps side by side then it wouldn’t work out of the box, or you’d need to do some funky binding stuff
We’ve had thoughts about handling global state, reusability of re-frame components, e.t.c., so the approach taken might change one day (with a backwards compatible migration path, i.e. copy the closure state back into global atoms so re-frame continues to function normally)
@danielcompton: it turns out the users are using Chrome. Phew.
Hi Guys - I wondered if there was a sample somewhere using re-frame (bigger than TodoMVC) - that would allow me to get my head around how I would structure my data? The key hangup I am finding - is how to go about interspersing UI related data with Model data. A good example is a tree of data that I would like to display. The UI related parts are - Is the node collapsed or open - the Model parts are “What are my attributes” and “What do my children contain”. It doesnt feel right polluting the Model state with UI state.
@jamesmintram: Check out https://github.com/Day8/re-frame/wiki/External-Resources for a couple examples
Thanks! Didn’t see that page 🙂
@jamesmintram: It's one of the few projects that has the problem of too much good documentation and info 🙂
really? that's what you call too much good documentation and info in the clojureworld? it's worrisome
@jamesmintram: I keep my "model-related data" under one path of app-db, and then all the view stuff in another. My apps have less links between the model and the views than your collapsable tree example, which might need to have the same structures in both model and view sub-maps of app-db?
@lewix: Not in the clojure world, I actually found re-frames documentation better and easier to understand (for me) than many resources from other languages and fields, including a university education and everything contained therein and many of the programming books I've read targeting other languages and fields.
@shaun-mahood: let's agree to disagree
@lewix: And if you have examples that are of a similar quality and scope, I would actually be very interested to look at them. I've found writing my own documentation hits a spot between technical knowledge and writing ability that is pretty sorely lacking.
@fasiha: thanks!
Really? I'm totally going to check it out then!
how about cider, would you consider this bad docs? https://cider.readthedocs.io/en/latest/
@roberto: I don't know. I'll have to experience it - trying to find info, etc. before I give my pov
The fact that it's considered excellent for the community get me a lil bit worried for the other libs
for a front-end library, I was able to get started just be browsing through the Readme.
I think the re-frame README gives you an intellectual skeleton that, once you've worked through a couple of examples and see how db-subs-views-handlers interact, you can look back on and go "Ahh, it all makes sense". It takes a good amount of experimentation with re-frame for that moment to come, and there's nowhere in the docs "here's how we'd set up a simple app from scratch".
Comparing re-frame docs to redux's, which Dan Abramov & Facebook friends work on full-time, is a little unfair.
yeah, starting from scratch would be challenging, I think most people that use re-frame have had prior experience with reagent and cljs
@fasiha: https://github.com/gaearon/react-dnd - excellent doc
i think it is probably just the way most people in clojure-land approach building something: with very small incremental steps, seldom people start with re-frame.
@lewix: but you see what I'm saying—Facebook opening some source code is a corporate release. @mikethompson I don't think is representing his employer in the re-frame README. I am much much more picky about my work when it's Real Work versus an internet project.
the original purpose of redux was for a presentation, so it inherently required to be well documented. The process of writing it was to explain a concept.
The broader issue that @lewix raises is legit I think—I would agree that the JS community generally makes more approachable, less cogitation-intensive, and generally "better" docs than Clojure
Not sure if it's a language issue or what—at my point, having "gotten" re-frame to some extent, the thought of trying to explain it to a node (non-react) or JVM Clojure dev walking into cljs is frightening and daunting
I think that the clojure world has a problem with "getting started" in general; the transition from beginner to intermediate can be daunting, and the docs are a byproduct of that. The educational materials and the libs are all scattered, it doesn't sound like there are a strong consensus on the best practices or the best tools. You are expected to glue the pieces by yourself - I believe that's what projects like arachne are attempting to solve
Well, @roberto, I wonder if there's a cultural element too—Elm has a huge barrier to entry but man, those docs, those error messages, those curated libs…!
Evan made it a priority to make Elm attractive to mainstream front-end devs, and it shows…
@fasiha: I wish Elm was a bit more mature. I would have definitely turned my focus to Elm
Clojure is a much bigger beast than Elm is now. I cannot wait to see what Elm and ClojureScript/re-frame/posh/om next look like in 1–2 years.
but I think Elm and Cljs are now light years ahead of js. Javascript is adapting the concepts in Elm and cljs, but for the most part, if you chose Elm or cljs, you are conciously deciding to be in the bleeding edge
Hi all, Im trying to workout how do do navigation is re-natal (re-frame in react-native.)
THis is what I have so far https://www.refheap.com/119260.
THe issue is that when I update the db using a dispatch from the figwheel repl the app-root function doesnt get re-rendered.
Is this because its not returning a component directly?
thats the intention, as it then gets executed. I messed around and bit and somehow seemed to get it to work… sooo yeah.