How can I iterate over an array and make a ref for each item with a functional-component the same way I'm doing it with a state-component

前端 未结 0 1780
無奈伤痛
無奈伤痛 2021-01-13 04:27

State-Component

props.dictionary.words.forEach((word) => {
    return this[word] = React.createRef()
  })

Trying to do something like this

相关标签:
回答
  • 消灭零回复
提交回复
热议问题