I am using Accordion inside each header there is different dynamic content. e.g first accordion will contain a list of skills(From API) and in the second accordion, I want some other data in list view. I can not statically define the content in the SECTION. I can do this inside renderContent but I am not able to get the reference of this.props or this.state.
Just convert it to an arrow function and you will automatically bind this:
_renderHeader = (section) => {
//Here you can use this
return (
<View>
<Text>{section.header}</Text>
</View>
);
}
Most helpful comment
Just convert it to an arrow function and you will automatically bind this: