navigation-rfc icon indicating copy to clipboard operation
navigation-rfc copied to clipboard

StackView and AnimatedStackView APIs

Open brentvatne opened this issue 8 years ago • 3 comments

StackView has a renderRoute prop, while AnimatedStackView has a renderScene and renderOverlay prop -- should we try to keep the APIs here the same or is there a reason why we use renderRoute instead of renderScene in StackView?

brentvatne avatar Dec 29 '15 21:12 brentvatne

The general reasoning is that AnimatedStackView will renderScene with a scene record that changes more frequently than than StackView needs to call renderRoute with a new route. for example when transitions happen and the stale property of the scene record switches.

But I'm totally willing to re-consider if there are other proposals

ericvicenti avatar Dec 30 '15 20:12 ericvicenti

What are some reasons you would expect renderScene be called more frequently than renderRoute?

sahrens avatar Jan 12 '16 23:01 sahrens

For example, when animating away from a route, we need to render with a scene record that has {stale: true}. Also, if a route moves positions in the list, we need to re-render with a scene record that has the new index, even though the route doesn't change.

ericvicenti avatar Jan 12 '16 23:01 ericvicenti