From 9bb1fbc9bc17568e56de830171973b18e7dca6a7 Mon Sep 17 00:00:00 2001 From: Christian Musa <1450075+crash7@users.noreply.github.com> Date: Wed, 13 Mar 2019 18:52:39 -0300 Subject: [PATCH] fix: update memo comparator condition (#18) --- src/Before.component.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Before.component.jsx b/src/Before.component.jsx index 916ca9c..daef44a 100644 --- a/src/Before.component.jsx +++ b/src/Before.component.jsx @@ -154,7 +154,7 @@ export function Before(props: BeforeComponentWithRouterProps) { const ShouldRender = memo( ({ children }: ShouldRenderProps) => children, (prevProps: ShouldRenderProps, nextProps: ShouldRenderProps) => { - return !nextProps.isFetching && nextProps.location !== prevProps.location; + return !nextProps.isFetching && nextProps.location === prevProps.location; } );