navigation-rfc
navigation-rfc copied to clipboard
StackView and AnimatedStackView APIs
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?
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
What are some reasons you would expect renderScene
be called more frequently than renderRoute
?
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.