From e95532b85ce517c2663a0c2fceed055275368dc8 Mon Sep 17 00:00:00 2001 From: Daniel Mueller Date: Wed, 12 Apr 2017 15:55:53 -0400 Subject: [PATCH] remove react-addons-pure-render-mixin --- package.json | 1 - src/DefaultRenderer.js | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 472e5f0f5..d039f3009 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,6 @@ } ], "dependencies": { - "react-addons-pure-render-mixin": "15.0.2", "react-native-experimental-navigation": "0.26.x", "react-native-tabs": "^1.0.9", "react-static-container": "1.0.1" diff --git a/src/DefaultRenderer.js b/src/DefaultRenderer.js index b81833158..82eb87a4a 100644 --- a/src/DefaultRenderer.js +++ b/src/DefaultRenderer.js @@ -7,7 +7,7 @@ * */ import React, { - Component, + PureComponent, PropTypes, } from 'react'; import { @@ -22,7 +22,6 @@ import NavBar from './NavBar'; import Actions from './Actions'; import { deepestExplicitValueForKey } from './Util'; import NavigationExperimental from 'react-native-experimental-navigation'; -import PureRenderMixin from 'react-addons-pure-render-mixin'; const SCREEN_WIDTH = Dimensions.get('window').width; @@ -99,7 +98,7 @@ function leftToRight(/* NavigationSceneRendererProps */ props) { }; } -export default class DefaultRenderer extends Component { +export default class DefaultRenderer extends PureComponent { static propTypes = { navigationState: PropTypes.object, @@ -113,7 +112,6 @@ export default class DefaultRenderer extends Component { constructor(props) { super(props); - this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this); this.renderCard = this.renderCard.bind(this); this.renderScene = this.renderScene.bind(this); this.renderHeader = this.renderHeader.bind(this);