Skip to content

Commit

Permalink
Set a key on pages so when switching between pages, the same componen…
Browse files Browse the repository at this point in the history
…t instance isn't reusued (#1460)
  • Loading branch information
KyleAMathews authored Jul 10, 2017
1 parent 36e5fce commit 34505fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/gatsby/src/cache-dir/component-renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class ComponentRenderer extends React.Component {
render() {
if (this.state.pageResources) {
return createElement(this.state.pageResources.component, {
key: this.props.location.pathname,
...this.props,
...this.state.pageResources.json,
})
Expand Down

0 comments on commit 34505fe

Please sign in to comment.