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
  • Loading branch information
KyleAMathews committed Jul 10, 2017
1 parent 36e5fce commit 7947c63
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 7947c63

Please sign in to comment.