I am pretty new to expo and react native in general and want to make an animation, that goes from my profile screen to my detail screen seamlessly.
I found that sharedTransitionTags are used for this things but when tried implementing it looks like this:
How my transition looks like
the structure of the Animated.View is the same except the height.
<Animated.View
style={{ width: widthOutfitCard, height: heightOutfitRow }}
sharedTransitionTag={"outfit-detail-" + outfit.id}
sharedTransitionStyle={customTransition}
></Animated.View>
tried using the sample animation from https://reactnavigation.org/docs/shared-element-transitions/
const customTransition = SharedTransition.custom((values) => {
'worklet';
return {
height: withSpring(values.targetHeight),
width: withSpring(values.targetWidth),
originX: withSpring(values.targetOriginX),
originY: withSpring(values.targetOriginY),
};
});
but this didn’t work as expected.
I would like to have a animation like Instagram. where it looks like the site isn’t changing.
Hope you understand my problem and you know how to fix it :).
lukmayr is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.