This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-04-20
Channels
- # aws-lambda (8)
- # beginners (37)
- # cider (43)
- # cljs-dev (12)
- # clojure (121)
- # clojure-italy (19)
- # clojure-nl (1)
- # clojure-poland (1)
- # clojure-russia (14)
- # clojure-spec (6)
- # clojure-uk (98)
- # clojurescript (28)
- # core-async (1)
- # cursive (7)
- # datomic (4)
- # emacs (63)
- # events (8)
- # fulcro (19)
- # graphql (4)
- # hoplon (3)
- # mount (1)
- # nrepl (101)
- # off-topic (15)
- # om (3)
- # pedestal (2)
- # portkey (31)
- # protorepl (2)
- # re-frame (26)
- # reagent (26)
- # reitit (2)
- # shadow-cljs (58)
- # spacemacs (8)
- # specter (5)
- # sql (56)
- # test-check (11)
- # tools-deps (48)
- # vim (52)
How do you handle modifying the inner-state of a type-3 component by a keyboard-event that is registered on component-did-mount
?
where is the state that keyboard-event
is modifying? in a r/atom
local to the component?
is it discouraged to use a reagent atom similar to a normal atom (e.g. derefing inside of a go-loop?)
you can use it however you want, but the observer code only runs during the evaluation of the render function
so if you do something async, like a go loop, the deref will probably happen outside of the render evaluation and the observer code won’t work
if you are mutating the ratom and you just want updates to happen, you can do that anywhere. it is likely that you’ll want to do that in a go block if you are using cljs-http, for exmaple
it’s just a relatively new technique. not that solid on js stacks afaict. it’s the kind of thing where small user base is a disadvantage
yeah. I've had simple SSR working for my team for awhile, but trying to figure out how to handle data fetching in a component-y way
right now I'm fumbling my way through figuring out re-frame and hacking on it to see if I can e.g. isolate the app-db per-request, dispatch any data-fetching events/effects, and wait for data to finish loading before rendering the component tree for reals
it was re-frame, some other framework or roll my own. it seems like re-frame has quite a following so I'm trying that out first
it’s probably great, but i feel if i just exercise some discipline i can do without
@lee.justin.m I was in the same boat as you regarding re-frame and discipline ... up until recently. I think what you can gain from re-frame, even if you are already disciplined, is stuff like re-frame-10x. The tooling around re-frame can get pretty great over time, and I am jealous that I don't get to use those goodies yet 😂
I was thinking the exact same thing. The conventions that people build up around re-frame are also nice to lean against when in doubt, and the chatter here, even. Nobody will be discussing your custom solution; with re-frame, that mindshare is free and includes free further development of the library.
We use a custom solution at work, and I really think we'd have much to gain from using re-frame instead.
I was thinking the exact same thing. The conventions that people build up around re-frame are also nice to lean against when in doubt, and the chatter here, even. Nobody will be discussing your custom solution; with re-frame, that mindshare is free and includes free further development of the library.
We use a custom solution at work, and I really think we'd have much to gain from using re-frame instead.