mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
refactor: convert app component to function component (#25547)
This commit is contained in:
parent
d62122b884
commit
c008c95c93
@ -16,20 +16,18 @@ const LazyRoot = React.lazy(() => import('components/root'));
|
|||||||
|
|
||||||
const Root = makeAsyncComponent('Root', LazyRoot);
|
const Root = makeAsyncComponent('Root', LazyRoot);
|
||||||
|
|
||||||
class App extends React.PureComponent {
|
const App = () => {
|
||||||
render() {
|
return (
|
||||||
return (
|
<Provider store={store}>
|
||||||
<Provider store={store}>
|
<CRTPostsChannelResetWatcher/>
|
||||||
<CRTPostsChannelResetWatcher/>
|
<Router history={getHistory()}>
|
||||||
<Router history={getHistory()}>
|
<Route
|
||||||
<Route
|
path='/'
|
||||||
path='/'
|
component={Root}
|
||||||
component={Root}
|
/>
|
||||||
/>
|
</Router>
|
||||||
</Router>
|
</Provider>
|
||||||
</Provider>
|
);
|
||||||
);
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default hot(App);
|
export default hot(React.memo(App));
|
||||||
|
Loading…
Reference in New Issue
Block a user