Skip to content

Commit

Permalink
fix: update memo comparator condition (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
crash7 authored and lfantone committed Mar 13, 2019
1 parent 1892340 commit 9bb1fbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Before.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
);

Expand Down

0 comments on commit 9bb1fbc

Please sign in to comment.