Skip to content

Instantly share code, notes, and snippets.

@apackin
Last active July 17, 2020 18:48
Show Gist options
  • Save apackin/413f895a90eec4a9841cadac5833bca4 to your computer and use it in GitHub Desktop.
Save apackin/413f895a90eec4a9841cadac5833bca4 to your computer and use it in GitHub Desktop.
FancyTextSubmit with forwardRef
const FancyTextSubmit = forwardRef(({ onClick }, ref) => (
<div>
<input ref={ref} type="text" />
<button onClick={onClick}>Submit</button>
</div>
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment