Skip to content

Commit 7b6af77

Browse files
committed
Updated CHANGELOG
1 parent 781cfaa commit 7b6af77

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
# [V2.2.0-alpha](https://github.com/nxtexe/react-motion-router/blob/main/CHANGELOG.md#v220-alpha)
2+
## Features
3+
- 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
17+
in: {
18+
type: 'slide',
19+
direction: 'right',
20+
duration: 350
21+
},
22+
out: {
23+
type: 'fade',
24+
duration: 200
25+
}
26+
};
27+
}
28+
}}
29+
/>
30+
```
31+
132
# [V2.1.0-alpha](https://github.com/nxtexe/react-motion-router/blob/main/CHANGELOG.md#v210-alpha)
233
## Features
334
- 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

Comments
 (0)