Search code examples
javascriptreactjsreact-nativereact-native-sectionlist

How to render one section horizontal with others vertical in react native SectionList


I'm implementing a list with the first section vertical and second section horizontal. How do I do that.

I know that I can set the whole sectionlist to horizontal but don't know how to do one particular section.


Solution

  • I've found the solution. First you create a sectionList. Format the section parameter so that the data variable is an array of array. When rendering the section list, render each item as a flatList.