Last active
June 13, 2020 09:30
-
-
Save ltsharma/b22aa8c7507e144477c3eeba7d118685 to your computer and use it in GitHub Desktop.
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); | |
//Moved functions | |
const awesomeChildListRenderItem = ({item})=>(<AwesomeChild {...item} onPress={(number)=>{setChildState(number)}} />) | |
const awesomeChildListKeyExtractor = (item)=>(`awesome-child-key-${item.id}`); | |
return( | |
<FlatList | |
renderItem={awesomeChildListRenderItem} | |
keyExtractor={awesomeChildListKeyExtractor} | |
/>) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment