You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added AnimationConfigFactory to ```Stack.Screen``` animation config prop. This is a function that returns an AnimationConfig object whose parameters are the pathname for the now outgoing element and the pathname for the now incoming element. Now you can dyanically create animations based on the outgoing pathname and the incoming pathname. E.g.
4
+
```
5
+
<Stack.Screen
6
+
path={"/tiles"}
7
+
component={Tiles}
8
+
config={{
9
+
animation: (currentPath, nextPath) => {
10
+
if (currentPath === "/tiles" && nextPath === "/slides") {
11
+
return {
12
+
type: 'fade',
13
+
duration: 350
14
+
};
15
+
}
16
+
return { // Also in and out animations can be set independently
- Option to enable memory routing meaning instead of relying on the ```popstate``` event and the browser ```window.location``` routing is done completely in memory. One thing to note is that ```window.location.pathname``` will always be ```'/'``` so it is better to just check location on the navigator prop passed to your screen. Essentially it's just ```window.location``` with pathname being filled in from memory.
0 commit comments