react-native-tab-navigator
Version:
A tab bar that switches between scenes, written in JS for cross-platform support
20 lines (15 loc) • 415 B
JavaScript
;
import React from 'react';
import PropTypes from 'prop-types';
export default class StaticContainer extends React.Component {
static propTypes = {
shouldUpdate: PropTypes.bool,
};
shouldComponentUpdate(nextProps: Object): boolean {
return !!nextProps.shouldUpdate;
}
render() {
let { children } = this.props;
return children ? React.Children.only(children) : null;
}
}