Can I use this project inside FlatList's item?
See original GitHub issueI write ItemList component and when select item, navigator will push to Detail component and show selected image in full size this is my code
ItemList
class ItemList extends Component {
renderItem = ({ item, index }) => {
return (
<TouchableOpacity
style={styles.cell}
onPress={() => { this.props.navigation.navigate('DETAIL', { item, index }) }}
>
<Transition shared={`image_${index}`}>
<Image
style={styles.image}
source={{ uri: item.uri }}
/>
</Transition>
</TouchableOpacity>
)
}
render() {
return (
<View style={styles.container}>
<FlatList
data={itemData}
renderItem={this.renderItem}
keyExtractor={(_, index) => `${index}`}
numColumns={3}
/>
</View>
)
}
}
Detail
const Detail = (props) => (
<View style={styles.container} >
<Transition shared={`image_${props.navigation.state.params.index}`}>
<Image
style={styles.image}
source={{ uri: props.navigation.state.params.item.uri }}
/>
</Transition>
</View>
)
but when I run my project, the animations works great but my image not appear after I provide it with Transition
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Display a List Using the FlatList Component in React Native
React Native provides a FlatList component to create a list. FlatList only renders the list items that can be displayed on the screen....
Read more >React-Native nested Flatlist - Stack Overflow
You can implement SectionList from 'react-native' library instead of using an nested FlatList. Its easier and a better solution.
Read more >How to use the FlatList Component — React Native Basics
First create a new function that renders the component you want in the header. You then want to actually render that header by...
Read more >How to use the FlatList component in React - LogRocket Blog
This post shows you how to use the FlatList component to display lists of items in React Native apps, implement pull to refresh, ......
Read more >Displaying a List in React Native: Map Method or FlatList ...
FlatList is a React Native component that only loads items that are currently visible on the screen and it deletes items as they...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m currently looking into this issue to see if I can find an easy fix.
Added fix in PR #10