Question: Preparing data in Render vs getDerivedStateFromProps
Hi, I'm looking for the best lifecycle method approach for my situation. I have some data provided via props from redux, this data needs to be run through a prepareData function before I can loop over it.
Is the best approach to call the function in getDerivedStateFromProps and store the final data in state or call the function in the render method like so:
<SectionList
sections={this.prepareData(this.props.data)} />