react-render-for
v1.0.3
Published
For loop available in React JSX
Downloads
2
Readme
react-render-for
For loop available in React JSX
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