From 8186055537d3bda89b0a4e9d2024cd04fecd76f3 Mon Sep 17 00:00:00 2001 From: Tom Hacohen Date: Sat, 16 Dec 2017 20:55:37 +0000 Subject: [PATCH] Syncgate: don't create the router aware components on each render. --- src/SyncGate.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/SyncGate.tsx b/src/SyncGate.tsx index 6ea751c..4ea2d4c 100644 --- a/src/SyncGate.tsx +++ b/src/SyncGate.tsx @@ -78,6 +78,9 @@ const syncInfoSelector = createSelector( }, ); +const PimRouter = withRouter(Pim); +const JournalRouter = withRouter(Journal); + class SyncGate extends React.PureComponent { props: PropsTypeInner; @@ -135,9 +138,6 @@ class SyncGate extends React.PureComponent { const journalMap = syncInfoSelector(this.props); - const PimRouter = withRouter(Pim); - const JournalRouter = withRouter(Journal); - return (