IWillReceiveProps is trigged when component props change (cursor passed into om/build). Not called on initial render http://facebook.github.io/react/docs/component-specs.html
This differs from IWillUpdate in that IWillUpdate is trigged when local component state changes as well. In React, the convention is to use willReceiveProps to update local state in response to prop changes. If you were to change state in willUpdate you could cause an infinite loop (React internals prevent this, but it's a bad idea!). On Thursday, May 1, 2014 5:24:14 AM UTC-4, Daniel Kersten wrote: > I've added IWillUnmount and IDisplayName to the documentation. I don't > understand what IWillReceiveProps is for exactly, so didn't add that. > > > > > On 30 April 2014 18:44, David Nolen <[email protected]> wrote: > > > > > Feel free to document! > > > > > > On Wed, Apr 30, 2014 at 1:38 PM, Daniel Kersten <[email protected]> wrote: > > > > > > > > Since version 0.5.1 (I think), there is also an IWillUnmount with function > (will-unmound [this]). It doesn't seem to be documented yet. > > > > > > > https://github.com/swannodette/om/blob/master/src/om/core.cljs#L31 > > > > > > > > > > > > On 30 April 2014 18:17, Sean Corfield <[email protected]> wrote: > > > > > > > > On Apr 28, 2014, at 8:10 AM, David Nolen <[email protected]> wrote: > > > > > > > > > I would create all go loops so that they listen on a kill channel. Write to > > the kill channel when the component unmounts. > > > > I see will-mount and did-mount but nothing for hooking into a component > unmount. What am I missing? > > > > Sean Corfield -- (904) 302-SEAN > > An Architect's View -- http://corfield.org/ > > > > "Perfection is the enemy of the good." > > -- Gustave Flaubert, French realist novelist (1821-1880) > > > > > > > > > > > > > > > > > -- > > Note that posts from new members are moderated - please be patient with your > first post. > > --- > > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/clojurescript. > > > > > > > > > > -- > > Note that posts from new members are moderated - please be patient with your > first post. > > --- > > You received this message because you are subscribed to the Google Groups > "ClojureScript" group. > > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/clojurescript. -- Note that posts from new members are moderated - please be patient with your first post. --- You received this message because you are subscribed to the Google Groups "ClojureScript" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/clojurescript.
