This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-06-13
Channels
- # admin-announcements (1)
- # beginners (10)
- # boot (15)
- # cider (9)
- # clara (195)
- # cljsrn (24)
- # clojars (20)
- # clojure (46)
- # clojure-android (1)
- # clojure-germany (15)
- # clojure-greece (16)
- # clojure-nl (1)
- # clojure-russia (13)
- # clojure-spec (28)
- # clojure-uk (44)
- # clojurescript (104)
- # clojurex (1)
- # component (7)
- # css (2)
- # cursive (27)
- # datomic (92)
- # dirac (12)
- # emacs (5)
- # lambdaisland (3)
- # lein-figwheel (36)
- # mount (87)
- # off-topic (8)
- # om (102)
- # om-next (3)
- # onyx (30)
- # pedestal (3)
- # re-frame (26)
- # reagent (20)
- # robots (4)
- # specter (18)
- # spirituality-ethics (1)
- # untangled (127)
- # yada (11)
reagent$impl$util$render_component()
util.js:267
reagent.core.render.cljs$core$IFn$_invoke$arity$3()
core.js:186
reagent$core$render()
core.js:169
reagent.core.render.cljs$core$IFn$_invoke$arity$2()
core.js:179
reagent$core$render()
core.js:165
<anonymous>
I don't like to have Chestnut depend on pre-release versions, but might be the best option here
Reagent is all but ready for release
Could be caused by something bringing on React 15 dep which doesn't work with old Reagent
Does anyone have a good solution for this problem? Suppose you have a screen with a text field for, say, search, which its value bound to an atom. When you navigate to the screen, the text field should be cleared. The question is: where do you clear the atom value?
You could clear it in component-did-mount
; but the component may not have been unmounted/remounted in the meantime.
Alternatively, you could do it when navigating to the screen; however it doesn't make sense for the origin screen to know too much about the other component (e.g. about clearing the input field contents).
Am I making sense?
Makes sense. Is there a way that a component can stay mounted while you navigate to another screen?
@escherize: at least with React Native it is, viz. when using the Navigator component (it keeps scenes mounted for performance I guess)
although a tab component in a web app might work similarly (to avoid removing and re-creating the dom elements)
For component-will-receive-props
it will take next-props as its argument. But, one should also be able to access this.props
to check old props. How do I access this
inside that lifecycle method? Using (this-as...
returns the entire Window object.
https://github.com/reagent-project/reagent/blob/master/src/reagent/core.cljs#L117 shows [this new-argv]
but this seems to show next props, and new-argv seems to be undefined