This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-05-15
Channels
- # aws (4)
- # beginners (98)
- # boot (23)
- # cider (63)
- # cljsrn (3)
- # clojure (259)
- # clojure-boston (1)
- # clojure-dev (2)
- # clojure-italy (6)
- # clojure-nl (17)
- # clojure-russia (1)
- # clojure-serbia (1)
- # clojure-spec (36)
- # clojure-uk (74)
- # clojurescript (11)
- # cursive (2)
- # datascript (12)
- # datomic (36)
- # defnpodcast (1)
- # devops (1)
- # docs (1)
- # emacs (15)
- # euroclojure (3)
- # fulcro (13)
- # graphql (1)
- # juxt (2)
- # lumo (27)
- # off-topic (46)
- # onyx (23)
- # pedestal (6)
- # planck (2)
- # portkey (27)
- # re-frame (18)
- # reagent (12)
- # remote-jobs (2)
- # ring-swagger (11)
- # rum (4)
- # shadow-cljs (104)
- # spacemacs (4)
- # sql (3)
- # tools-deps (5)
- # vim (45)
@juhoteperi I was debugging komponentit/autocomplete yesterday and noticed the set-state used there. What's your take on this?
@macroz It is probably unnecessarily complex, I originally had some performance problems and didn't know how to solve them properly.
Probably the problems weren't even solved by using set-state
directly, but just because I rewrote the whole component.
Sure. I was thinking that is there any need for set-state really, or is closure with a ratom always better, cleaner and lisper?
Should work exactly the same. set-state
is anyway a RAtom that is stored in component state, so it is pretty much the same as ratom in closure.
set-state is really not mentioned in most tutorials so it's kind of deprecated then? 🙂
I can see why someone would use set-state outside of the lexical scope but then there's the state-atom as well.
set-state
uses the state-atom
Reagent release 0.8.1 is out: https://github.com/reagent-project/reagent/blob/master/CHANGELOG.md#081-2018-05-15