Skip to content

Commit

Permalink
Updated CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
absurdprofit committed Feb 26, 2022
1 parent 781cfaa commit 7b6af77
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,34 @@
# [V2.2.0-alpha](https://github.com/nxtexe/react-motion-router/blob/main/CHANGELOG.md#v220-alpha)
## Features
- 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.
```
<Stack.Screen
path={"/tiles"}
component={Tiles}
config={{
animation: (currentPath, nextPath) => {
if (currentPath === "/tiles" && nextPath === "/slides") {
return {
type: 'fade',
duration: 350
};
}
return { // Also in and out animations can be set independently
in: {
type: 'slide',
direction: 'right',
duration: 350
},
out: {
type: 'fade',
duration: 200
}
};
}
}}
/>
```

# [V2.1.0-alpha](https://github.com/nxtexe/react-motion-router/blob/main/CHANGELOG.md#v210-alpha)
## Features
- 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.
Expand Down

0 comments on commit 7b6af77

Please sign in to comment.