-
-
Save streetsmartdev/99fbdb0bbf20c166d1abf51a1ac44bc7 to your computer and use it in GitHub Desktop.
RN-LFVL-4 - Extract item attribute from parameters passed into renderItem
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 class Application extends Component { | |
... | |
render() { | |
if (this.state.isLoading) { | |
... | |
} else { | |
return ( | |
<FlatList | |
data={this.state._data} | |
renderItem={rowParameter => { //Replaces renderRow={rowData => { | |
const rowData = rowParameter.item; | |
return ( | |
... | |
); | |
}} | |
... | |
/> | |
); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment