У меня есть компонент реакции со следующим элементом ввода:
import React, {
Component
} from 'react';
import {Input } from 'reactstrap';
constructor(props) {
super(props)
this.test = React.createRef();
}
render() {
console.info(this.test.current)
return (
<Input ref = {this.test} defaultValue = "This is the default" />
)
}
Я хочу получить значение Prop из ссылки {this.test} однако, когда я веду консольный журнал, я получаю следующий вывод.
Input {props: {…}, context: {…}, refs: {…}, updater: {…}, getRef: ƒ, …}
context: {}
focus: ƒ ()
getRef: ƒ ()
props: {defaultValue: "This is the default", onChange: ƒ, type: "text"}
refs: {}
state: null
updater: {isMounted: ƒ, enqueueSetState: ƒ, enqueueReplaceState: ƒ, enqueueForceUpdate: ƒ}
_reactInternalFiber: FiberNode {tag: 1, key: null, elementType: ƒ, type: ƒ, stateNode: Input, …}
_reactInternalInstance: {_processChildContext: ƒ}
isMounted: (...)
replaceState: (...)
__proto__: Component
Как получить значение, используя тег «Input» reactstrap вместо встроенного HTML-элемента «input» Dom.



![Безумие обратных вызовов в javascript [JS]](https://i.imgur.com/WsjO6zJb.png)


Спасибо, это работает. Изменил мой код на: <Input innerRef = {this.test} defaultValue = "Это значение по умолчанию" onChange = {this.handleChangeEvent}/>