Easy list system based on ReactNative's FlatList API
The final objective of this lib is to build simple lists without dealing with maps, keys, last item and empty list logics
npm install --save react-easy-list
import React from 'react'
import EaseList from 'react-easy-list'
const Example = () => {
<EasyList
data={[
{ id: 1, title: 'Hello', content: 'World' },
{ id: 2, title: 'World', content: 'Hello' },
]}
renderItem={({ title, content }) => (
<>
<h1>{title}</h1>
<h2>{content}</h2>
</>
)}
ListHeaderComponent={<p>---- This is the beginning ----</p>}
ListFooterComponent={<p>---- This is the end ----</p>}
/>
}
MIT © JoaoBGusmao