Skip to content
Rogain <Each /> helper component
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.babelrc
.gitignore
.jshintrc
.npmignore
LICENSE
README.md
package.json

README.md

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

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.