Last active
June 13, 2020 09:30
-
-
Save ltsharma/beeac1b170695e40f5265ec077d0cb06 to your computer and use it in GitHub Desktop.
React Native Render With Inline Functions - dev.to Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default ()=>{ | |
const [childState, setChildState] = useState(0); | |
return( | |
<FlatList | |
renderItem={ | |
({item})=>( | |
<AwesomeChild {...item} onPress={(number)=>{setChildState(number)}} /> | |
)} | |
keyExtractor={(item)=>`awesome-child-key-${item.id}`} | |
/>) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment