Created
July 12, 2017 09:17
-
-
Save shabaz-ejaz/e386b400266d1bd14325436c4c8549c6 to your computer and use it in GitHub Desktop.
Map function with index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{survey.data.questions.map((item, index) => ( | |
<Step> | |
<StepButton onClick={() => this.setState({ stepIndex: index })}> | |
{item.question_category} | |
</StepButton> | |
</Step> | |
))} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment