Skip to content

Conversation

luigy
Copy link
Contributor

@luigy luigy commented Jul 18, 2014

Examples are broken for not checking that activeRoute is null before calling it.
Thoughts on activeRoute being a function that returns null by default?

this.props.activeRoute() || this.IndexTemplate()

vs

this.props.activeRoute ? this.props.activeRoute() : this.IndexTemplate();

@ryanflorence
Copy link
Member

I like this. @mjackson?

mjackson added a commit that referenced this pull request Jul 18, 2014
turn activeRoute into a function that returns null when no child routes are active
@mjackson mjackson merged commit 680af7d into remix-run:master Jul 18, 2014
@mjackson
Copy link
Member

Yeah. This is what @benjohnson was talking about.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 21, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants