mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-29 01:28:48 +00:00
Router not use memo
This commit is contained in:
parent
ac7b211b0a
commit
15b135bc2f
1 changed files with 2 additions and 4 deletions
|
|
@ -7,7 +7,7 @@ const { RoutesContainerProvider } = require('../RoutesContainerContext');
|
|||
const Route = require('./Route');
|
||||
const styles = require('./styles');
|
||||
|
||||
const Router = React.memo(({ className, homePath, ...props }) => {
|
||||
const Router = ({ className, homePath, ...props }) => {
|
||||
const onPathNotMatch = React.useRef(props.onPathNotMatch);
|
||||
const viewsConfig = React.useMemo(() => {
|
||||
return props.viewsConfig.map((viewConfig) => {
|
||||
|
|
@ -110,9 +110,7 @@ const Router = React.memo(({ className, homePath, ...props }) => {
|
|||
}
|
||||
</RoutesContainerProvider>
|
||||
);
|
||||
});
|
||||
|
||||
Router.displayName = 'Router';
|
||||
};
|
||||
|
||||
Router.propTypes = {
|
||||
className: PropTypes.string,
|
||||
|
|
|
|||
Loading…
Reference in a new issue