⚠️ Breaking Changes ⚠️
- Bump the peerDep for react to
>= 16.3.0
🎉 Improvements 🎉
- Support ref forwarding on form controls (#7)
function Example() {
const inputRef = React.useRef(null);
const selectRef = React.useRef(null);
const textareaRef = React.useRef(null);
const handleChange = (_ref) => (e) => {
console.log(e.target.value);
console.log(_ref.current.value);
};
return (
<>
<Input ref={inputRef} onChange={handleChange(inputRef)} />
<Select ref={selectRef} onChange={handleChange(selectRef)}>
<option value="1">One</option>
<option value="2">Two</option>
</Select>
<Textarea ref={textareaRef} onChange={handleChange(textareaRef)} />
</>
);
}