Syncgate: don't create the router aware components on each render.
parent
4613a65365
commit
8186055537
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue