@levid77/sx-react-devkit
v0.0.5
Published
Download the package by:
Downloads
4
Readme
Available Scripts
Download the package by:
npm install @levid77/sx-react-devkit
You can import like this:
import { ForEach, field } from '@levid77/sx-react-devkit';
ForEach expects a data set and returns an item, sparing the markup for array.map. field() function takes in 3 params (item, 'properties', isTheTypeArray)
Example code:
<ForEach data={dataSet}>
{item => (
<div>
<li style={{ color: "white" }}>
{item.name} - {field(item, "price.value")} {field(item, "price.currency")}
</li>
</div>
)}
</ForEach>