0.0.4 • Published 1 year ago
react-easy-list v0.0.4
react-easy-list
THIS LIB IS NOT DONE YET
Easy list system based on ReactNative's FlatList API
Why
The final objective of this lib is to build simple lists without dealing with maps, keys, last item and empty list logics
Install
npm install --save react-easy-list
Usage
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>}
/>
}
License
MIT © JoaoBGusmao