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
try this
mapArrayToButtons(){ const buttons = this.state.textArr.map((word)=>{ console.log('the word: ',word); return({word});}); return buttons; }