1.0.3 • Published 4 years ago

react-render-for v1.0.3

Weekly downloads
22
License
MIT
Repository
github
Last release
4 years ago

react-render-for

For loop available in React JSX

NPM JavaScript Style Guide

Install

npm install --save react-render-for

Usage

import React from 'react'
import RFor from 'react-render-for'

const data = ['Elemento 1', 'Elemento 2', 'Elemento 3'] // ...

const Box = ({ item }) => (
  <div className='BoxStyle'>
    <h6>{item}</h6>
  </div>
)

const App = () => {
  return (
    <div className='AppWrapper'>
      <RFor data={data} renderItem={(item) => <Box item={item} />} />
    </div>
  )
}

export default App

License

MIT © OtacilioN

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago