I have an input that after the user inserts a text I want to show each word in a button in button-group. I split the sentence and map it that returns
button-group
You will need to return a value from your function like so:
mapArrayToButtons(){ return this.state.textArr.map((word)=>{ return({word});}); }
Hope that helps!