diff --git a/packages/react-navigation/src/views/Transitioner.js b/packages/react-navigation/src/views/Transitioner.js index 051f874b..b64c3d87 100644 --- a/packages/react-navigation/src/views/Transitioner.js +++ b/packages/react-navigation/src/views/Transitioner.js @@ -179,9 +179,19 @@ class Transitioner extends React.Component { const prevTransitionProps = this._prevTransitionProps; this._prevTransitionProps = null; + const scenes = this.state.scenes.filter(isSceneNotStale); + const nextState = { ...this.state, - scenes: this.state.scenes.filter(isSceneNotStale), + /** + * Array.prototype.filter creates a new instance of an array + * even if there were no elements removed. There are cases when + * `this.state.scenes` will have no stale scenes (typically when + * pushing a new route). As a result, components that rely on this prop + * might enter an unnecessary render cycle. + */ + scenes: + this.state.scenes.length === scenes.length ? this.state.scenes : scenes, }; this._transitionProps = buildTransitionProps(this.props, nextState);