The code before needlessly factored out functions in functions and made it impossible to read and change. Also it wasn't using a FlatList which is a performance problem.