I have a container component that creates a child component with input. I would like to have access to the value of the child component during the onChange event, but I get a "Proxy" object instead of the input value.
Container component
... class InputContainer extends React.Component { handleChange = (val) => { console.log(val); // => Proxy { [[Handler]]: Object, [[Target]]: SyntheticEvent, [[isRevoked]]: false } } render() { return <Input handleChange={this.handleChange} {...this.props} />; } } export default connect(mapStateToProps, mapDispatchToProps)(InputContainer);
Input component
export default function Input(props) { return <input onChange={props.handleChange} />; }
Why am I getting this proxy object and how can I get the input value from the InputContainer ?
javascript reactjs redux
Himmel
source share