[ReactNative] Navigator initially render all scenes

This commit is contained in:
Eric Vicenti 2015-04-16 10:27:10 -07:00
parent 50c9c616fb
commit b3a2d6c574
1 changed files with 4 additions and 3 deletions

View File

@ -287,9 +287,10 @@ var Navigator = React.createClass({
),
idStack: routeStack.map(() => getuid()),
routeStack,
// These are tracked to avoid rendering everything all the time.
updatingRangeStart: initialRouteIndex,
updatingRangeLength: initialRouteIndex + 1,
// `updatingRange*` allows us to only render the visible or staged scenes
// On first render, we will render every scene in the initialRouteStack
updatingRangeStart: 0,
updatingRangeLength: routeStack.length,
// Either animating or gesturing.
isAnimating: false,
jumpToIndex: routeStack.length - 1,