So, the <Match>
Component takes a prop children
which allows the following:
<Match children={({ matched, ...rest}) => (
{/* Animate will always render, so you can use lifecycles
to animate its children */}
<Animate>
{matched && (
<Something {...rest}/>
)}
</Animate>
)}/>
As taken from the current v4 docs.
The function provided via this children
prop will always be rendered, regardless whether it's a match or not - allowing to use lifecycle hooks in <Animated>
to animate the content e.g. using ReactCSSTransitionGroup
.
Unfortunately this prop is missing in the <Miss>
component, making it unpossible to use lifecycles to animate it. Would be nice to add it.
thanks, yeah the rendering code was once shared, i'm going to share it
again with a new component so match and miss composition is easier for
others too
On Mon, Oct 10, 2016 at 6:32 PM Stefan [email protected] wrote:
So, the
Component takes a prop children which allows the
following:
{/* Animate will always render, so you can use lifecycles to animate its children */}
{matched && (
)}
)}/>As taken from the current v4 docs.
The function provided via this children prop will _always_ be rendered,
regardless whether it's a match or not - allowing to use lifecycle hooks in
to animate the content e.g. using ReactCSSTransitionGroup. Unfortunately this prop is missing in the
component, making it
unpossible to use lifecycles to animate it. Would be nice to add it.—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/ReactTraining/react-router/issues/4026, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAGHaJoGOZX4F4I_ZQpNW5JZiwD_wlsWks5qyucegaJpZM4KTJt4
.
@ryanflorence I've made a PR to fix this issue (while the rendering code is not shared yet). I'm new here. Please advise if there's anything wrong.
<Miss>
is gone in the current v4 branch. Closing.
Most helpful comment
thanks, yeah the rendering code was once shared, i'm going to share it
again with a new component so match and miss composition is easier for
others too
On Mon, Oct 10, 2016 at 6:32 PM Stefan [email protected] wrote: