Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

feat: expose animation related properties in context #278

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/utils/StackAnimationProgressContext.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react';
import Animated from 'react-native-reanimated';

export default React.createContext<Animated.Value<number>>(
export default React.createContext<Animated.Node<number>>(
new Animated.Value(0)
);
4 changes: 3 additions & 1 deletion src/views/Stack/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,9 @@ export default class Card extends React.Component<Props> {
contentStyle,
]}
>
<StackAnimationProgressContext.Provider value={current}>
<StackAnimationProgressContext.Provider
value={next || current}
chrfalch marked this conversation as resolved.
Show resolved Hide resolved
>
<StackAnimationIsSwipingContext.Provider
value={this.isSwiping}
>
Expand Down