showing results for - "react native navigation shared element"
Aarón
07 Jan 2017
1import { createSharedElementStackNavigator } from 'react-navigation-shared-element';
2
3const stackNavigator = createSharedElementStackNavigator(
4  {
5    List: ListScreen,
6    Detail: DetailScreen,
7  },
8  {
9    initialRouteName: 'List',
10  }
11);
12
13const AppContainer = createAppContainer(stackNavigator);
Samuel
28 Jul 2020
1// ListScreen.js
2import { SharedElement } from 'react-navigation-shared-element';
3
4class ListScreen extends React.Component {
5  renderItem(item) {
6    const { navigation } = this.props;
7    return (
8      <TouchableOpacity onPress={() => navigation.push('Detail', { item })}>
9        <SharedElement id={`item.${item.id}.photo`}>
10          <Image source={item.photoUrl} />
11        </SharedElement>
12      </TouchableOpacity>
13    );
14  }
15}
Clara
07 Feb 2017
1// DetailScreen.js
2const DetailScreen = (props) => {
3  const item = props.navigation.getParam('item');
4  return (
5    <SharedElement id={`item.${item.id}.photo`}>
6      <Image source={item.photoUrl} />
7    </SharedElement>
8  );
9};
10
11DetailScreen.sharedElements = (navigation, otherNavigation, showing) => {
12  const item = navigation.getParam('item');
13  return [`item.${item.id}.photo`];
14};
queries leading to this page
react native shared element react navigation 5how to react native shared element react navigation 5 mediumreact navigation shared element mediumreact navigation shared element examplereact native shared element navigationshared element react navigation 22v6 22react native shared elementsreact native navigation shared element transitionshared element transition react native navigationreact navigation shared elementreact navigation shared elemetnzreact native shared element navigationreact native shared element with react navigation 5react navigation shared element v6shared element react stack navigatorreact native shared element navigation 5shared element react navigation v6react navigation shared elementreact navigation shared elementshow to react native shared element react navigation 5 expo react navigation shared element and stack stacknavigatorreact navigation shared element for react navigation v5react navigattion shared elementsshared navigation react native navigationreact native shared navigationreact navigation shared elementreact native navigation shared elementexpo react navigation shared element andstacknavigatorreact navigation shared element expocreate shared element stack navigatorreact navigation shared element v5react native react navigation shared transitionreact native stack navigator shared element transitionreact native create shared element stack navigatorshared element navigation componentreact native shared elementreact navigation sahred elementreact navigation shared element v3react navigation shared element screen optionsreact navigation screent transtion element persistshared element react navigation 6react navigation shared element closereact navigation shared element callbackreact navigation shared element v5react navigation tabs shared elementreact navigation shared element optionsshared element stack navigatorcreate shared element stacknavigatorreact navigation shared web nativereact navigation shared element go backshared element react navigationreact native shared element navigation durationreact native shared element react navigation 6react native navigation shared element