Skip to content

Instantly share code, notes, and snippets.

@ryanflorence
Created October 6, 2017 18:10
Show Gist options
  • Save ryanflorence/1e7e22cbd92ba132dbbff893f0b51d7b to your computer and use it in GitHub Desktop.
Save ryanflorence/1e7e22cbd92ba132dbbff893f0b51d7b to your computer and use it in GitHub Desktop.
const App = (props) => (
<div>
<h1>Welcome, {props.name}</h1>
<Route path=”/” render={() => (
<div>
{/*
props.name is from outside of Route and it’s not passed in
as a prop, so Route can’t reliably be a PureComponent, it
has no knowledge of what is rendered inside here.
*/}
<h1>Hey, {props.name}, let’s get started!</h1>
</div>
)}/>
</div>
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment