From 34505fea9e2c00801248f647c7fdbb4c7ce29012 Mon Sep 17 00:00:00 2001 From: Kyle Mathews Date: Mon, 10 Jul 2017 16:33:59 -0700 Subject: [PATCH] Set a key on pages so when switching between pages, the same component instance isn't reusued (#1460) --- packages/gatsby/src/cache-dir/component-renderer.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/gatsby/src/cache-dir/component-renderer.js b/packages/gatsby/src/cache-dir/component-renderer.js index b3162c57e1a9d..2dc2d5696ed65 100644 --- a/packages/gatsby/src/cache-dir/component-renderer.js +++ b/packages/gatsby/src/cache-dir/component-renderer.js @@ -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, })