Fork me on GitHub
#reagent
<
2016-06-13
>
joshjones02:06:08

thanks again @plexus 🙂

plexus11:06:33

anyone seen this before?

plexus11:06:39

React["render"] is not a function

plexus11:06:53

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>

plexus11:06:27

[reagent "0.5.1"]

plexus11:06:36

it's fine on 0.6.0-rc...

plexus11:06:31

I don't like to have Chestnut depend on pre-release versions, but might be the best option here

danielcompton12:06:17

Reagent is all but ready for release

plexus12:06:15

that's good to hear 🙂

juhoteperi12:06:10

Could be caused by something bringing on React 15 dep which doesn't work with old Reagent

pesterhazy14:06:34

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?

pesterhazy14:06:20

You could clear it in component-did-mount; but the component may not have been unmounted/remounted in the meantime.

pesterhazy14:06:27

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).

pesterhazy14:06:39

Am I making sense?

escherize14:06:08

Makes sense. Is there a way that a component can stay mounted while you navigate to another screen?

pesterhazy15:06:26

@escherize: at least with React Native it is, viz. when using the Navigator component (it keeps scenes mounted for performance I guess)

pesterhazy15:06:09

although a tab component in a web app might work similarly (to avoid removing and re-creating the dom elements)

tom21:06:44

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.

tom22:06:52

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

tom22:06:00

ok it's not undefined, just figwheel weirdness.