1.1.0 • Published 8 years ago

rogain-component-each v1.1.0

Weekly downloads
2
License
MIT
Repository
github
Last release
8 years ago

rogain-component-each

Returns a tree of the data mapped to children. Each child can access the current element with the @item (or as attribute) properties and the current index with @index or @key.

<Each data={searchResults} as="result">
    <Card title={result.title} contents={result.excerpt} />
</Each>

Attributes

data

Variable. Array or Object.

as

String. Optional. Defines the local variable name for accessing each element in data. Defaults to @item.

Install

With npm do:

npm install rogain-component-each

License

MIT