This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-02-19
Channels
- # beginners (25)
- # boot (143)
- # braid-chat (9)
- # cider (18)
- # cljs-dev (88)
- # cljsrn (1)
- # clojure (91)
- # clojure-austin (2)
- # clojure-berlin (3)
- # clojure-japan (26)
- # clojure-russia (148)
- # clojurebridge (1)
- # clojured (29)
- # clojurescript (105)
- # cursive (7)
- # data-science (4)
- # datomic (15)
- # devcards (4)
- # emacs (8)
- # euroclojure (2)
- # events (1)
- # gsoc (27)
- # hoplon (3)
- # immutant (3)
- # ldnclj (3)
- # lein-figwheel (9)
- # leiningen (2)
- # luminus (1)
- # off-topic (5)
- # om (176)
- # onyx (136)
- # parinfer (16)
- # proton (13)
- # re-frame (33)
- # reagent (34)
- # spacemacs (1)
- # yada (127)
Odd... on-key-press
won't work for trying to make a button clickable via keypress?
Has someone managed to get reagent working with radium, or are there better ways of using inline styles for reagent components?
Hello. Have anyone tried to befriend Reagent (or React in general) with Handsontable (https://handsontable.com/)?
Can you compose components to reagent using partial
?
Looks like I can yayy
does reagent automatically do a :should-component-update
w/ equality checks on the props?
whatcha seeing, jaredly? i'm a rookie here, spent yesterday poring through the reagent source for fun - can't say i understand all of it yet, but i might have seen something like what you're looking for
is https://github.com/reagent-project/reagent/blob/master/src/reagent/impl/component.cljs#L158 relevant?
at this point i understand how RAtoms work, like how they're able to notify the reagent system (via their parent Reaction instance) that their state has changed, and that the root component should be recalculated - but i haven't yet figured out, like, what happens next
in particular i haven't been able to find anything that looks like a react setState call, which i'd imagine has got to be somewhere in there
i haven't used react before, but i read through the docs a couple days ago and it looked like setState was the specific way that you communicate updates to the framework
hrm. from the om post - "Thus we don't need React operations like setState, which exists to support both efficient subtree updating as well as good object-oriented style. Subtree updating for Om starting from root is always lightning fast because we're just doing reference equality checks all the way down."
re: my early setstate puzzling, so maybe reagent doesn't have setstate either? i don't understand how anything works without it though
post goes on to say that "we always re-render from the root" - again, this is om, but that matches what i saw in reagent source
"Calling forceUpdate() will cause render() to be called on the component, skipping shouldComponentUpdate(). This will trigger the normal lifecycle methods for child components, including the shouldComponentUpdate() method of each child. React will still only update the DOM if the markup changes."
i'm sure these notes are useless for anyone except me, but in case they're somehow helpful, the scattered notes i took while i was reading through all this code are at the bottom of https://github.com/jrheard/cljs-sandbox/blob/master/dev-diary.txt
@kanwei: should work. Here's a code sample.
@jrheard: Reagent does not re-render from the root each time. there are various tutorials at the bottom of this page which will should give you a clean mental model: https://github.com/Day8/re-frame/wiki (warning: clean mental models sometimes differ in details from what the code actually does, so certainly reading the reagent code is more accurate :-))
thx @mikethompson ! been meaning to read the re-frame docs, haven't gotten around to it yet but it's on my shortlist. the scroll bar on https://github.com/Day8/re-frame is so tiny :O
There are reagent specific Wiki pages at the bottom of that page.