Fix usages of ReactComponentWithPureRenderMixin
Summary: Closes https://github.com/facebook/react-native/pull/13111 Differential Revision: D4761971 Pulled By: davidaurelio fbshipit-source-id: 668dcc58e8e1b075ee760233abc6904beede9218
This commit is contained in:
parent
720e19525e
commit
a2cfea1934
|
@ -37,7 +37,6 @@ const NavigationHeaderStyleInterpolator = require('NavigationHeaderStyleInterpol
|
|||
const NavigationHeaderTitle = require('NavigationHeaderTitle');
|
||||
const NavigationPropTypes = require('NavigationPropTypes');
|
||||
const React = require('React');
|
||||
const ReactComponentWithPureRenderMixin = require('react/lib/ReactComponentWithPureRenderMixin');
|
||||
const ReactNative = require('react-native');
|
||||
const TVEventHandler = require('TVEventHandler');
|
||||
|
||||
|
@ -82,7 +81,7 @@ const APPBAR_HEIGHT = Platform.OS === 'ios' ? 44 : 56;
|
|||
const STATUSBAR_HEIGHT = Platform.OS === 'ios' ? 20 : 0;
|
||||
const {PropTypes} = React;
|
||||
|
||||
class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
||||
class NavigationHeader extends React.PureComponent<DefaultProps, Props, any> {
|
||||
props: Props;
|
||||
|
||||
static defaultProps = {
|
||||
|
@ -121,14 +120,6 @@ class NavigationHeader extends React.Component<DefaultProps, Props, any> {
|
|||
viewProps: PropTypes.shape(View.propTypes),
|
||||
};
|
||||
|
||||
shouldComponentUpdate(nextProps: Props, nextState: any): boolean {
|
||||
return ReactComponentWithPureRenderMixin.shouldComponentUpdate.call(
|
||||
this,
|
||||
nextProps,
|
||||
nextState
|
||||
);
|
||||
}
|
||||
|
||||
_tvEventHandler: TVEventHandler;
|
||||
|
||||
componentDidMount(): void {
|
||||
|
|
Loading…
Reference in New Issue