Skip to content

Instantly share code, notes, and snippets.

@marshallmurphy
Created May 4, 2020 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marshallmurphy/8a247f0e41f2ad2ca5664150f076d834 to your computer and use it in GitHub Desktop.
Save marshallmurphy/8a247f0e41f2ad2ca5664150f076d834 to your computer and use it in GitHub Desktop.
// App.js
...
<div className={styles.preferences}>
{options.map((item, index) => {
return (
<ToggleRow option={item} index={index} /> // pass index to component
);
})}
</div>
</div>
</main>
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment