Syncgate: don't create the router aware components on each render.

master
Tom Hacohen 2017-12-16 20:55:37 +00:00
parent 4613a65365
commit 8186055537
1 changed files with 3 additions and 3 deletions

View File

@ -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 (
<Switch>
<Route