mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 09:21:09 +08:00
20 lines
366 B
TypeScript
20 lines
366 B
TypeScript
import * as React from 'react';
|
|
|
|
function StaticContainer(props: any) {
|
|
return props.children;
|
|
}
|
|
|
|
export default React.memo(StaticContainer, (prevProps: any, nextProps: any) => {
|
|
for (const prop in prevProps) {
|
|
if (prop === 'children') {
|
|
continue;
|
|
}
|
|
|
|
if (prevProps[prop] !== nextProps[prop]) {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
return true;
|
|
});
|