Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/cheton/react-foreach

A React component that renders each element of collection using a function as child component.
https://github.com/cheton/react-foreach

foreach map react

Last synced: 23 days ago
JSON representation

A React component that renders each element of collection using a function as child component.

Awesome Lists containing this project

README

        

# react-foreach [![build status](https://travis-ci.org/cheton/react-foreach.svg?branch=master)](https://travis-ci.org/cheton/react-foreach) [![Coverage Status](https://coveralls.io/repos/github/cheton/react-foreach/badge.svg?branch=master)](https://coveralls.io/github/cheton/react-foreach?branch=master)

[![NPM](https://nodei.co/npm/react-foreach.png?downloads=true&stars=true)](https://nodei.co/npm/react-foreach/)

A React component that renders each element of collection using a function as child component.

## Installation

```
npm install --save react react-foreach
```

## Usage

You can use lodash's uniqueId() to return unique keys for array children.

```js

{(value, index, array) => (

{value}

)}

```

## API

### Properties

Name | Type | Default | Description
:--- | :--- | :------ | :----------
items | array | | A list of items to render.

## License

MIT