// App.js
...
<div className={styles.preferences}>
{options.map((item, index) => {
return (
<ToggleRow option={item} index={index} /> // pass index to component
);
})}
</div>
</div>
</main>
...
view raw App.js hosted with ❤ by GitHub