How to get an input value using “refs” in react-bootstrap form?

前端 未结 7 846
小蘑菇
小蘑菇 2021-02-05 04:01

I\'m trying to create a form that appears in modal. So when user input a value, that value is stored in local storage. Here\'s a picture that help\'s you to understand what I me

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-05 04:37

    I think what it suggests to use is the ref callback attribute, so just change inputRef to ref.

    FYI: https://facebook.github.io/react/docs/refs-and-the-dom.html

提交回复
热议问题