IjzerenHein / IjzerenHein/react-navigation-shared-element

IOS - react navigation V5 and V6

Open
#189 11 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
1.3k
Forks
125
PR merge metrics
No merged PRs in 30d

Description

I have problems on IOS

video react-navigation V5: https://drive.google.com/file/d/1gijykz-Gb5-NXj7Mq0tcvIWmCWjk9YJt/view?usp=sharing
video react-navigation V6: https://drive.google.com/file/d/1u8IkT26xgUaAUtIs7wYxgP9ZEgAVfBly/view?usp=sharing

component:
```
Product.sharedElements = (route, otherRoute, showing) => {
const { randomId, imageUrl, name } = route.params as ProductParams;
const animations: any = [
{
id: `cartbar`,
animation: 'fade',
resize: 'clip'
}
];

if (imageUrl !== undefined) {
animations.push({
id: `item.${randomId}.image`,
animation: 'move',
resize: 'clip',
align: 'center'
});
}
if (name) {
animations.push({
id: `item.${randomId}.name`,
animation: 'fade'
// resize: 'clip'
});
}
return animations;
};
export default Product;
```

screenOptions:
```
cardStyleInterpolator: ({ current: { progress } }) => {
const opacity = progress.interpolate({
inputRange: [0, 1],
outputRange: [0, 1],
extrapolate: 'clamp'
});
return { cardStyle: { opacity } };
},
gestureEnabled: false,
cardStyle: {
backgroundColor: 'transparent'
},
animationEnabled: true,
transitionSpec: {
open: {
animation: 'timing',
config: {
duration: 350
}
},
close: {
animation: 'timing',
config: {
duration: 350
}
}
}
```

device: ios
react-navigation-shared-element: V3.1.2
expo: managed V42
react-native-navigation: V5 and V6
react-native: SDK42
iphone: XR
ios: 14.7.1

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the iOS behavior using the provided Product.sharedElements component and screenOptions, comparing the linked videos for React Navigation V5 and V6. No repository file or test is named; done would require a clearly reproduced issue and an agreed correction for the shared-element transition.

Written by the indexing model from the issue text.

Assessment

Tech stack
ios, react-native, typescript
Domain
mobile
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.