rogain-component-each

1.1.0 • Public • Published

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

Package Sidebar

Install

npm i rogain-component-each

Weekly Downloads

0

Version

1.1.0

License

MIT

Last publish

Collaborators

  • krambuhl