Created
April 23, 2019 21:52
-
-
Save gaperton/64310c6b10994d349095a78452b1e742 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Minimal working example demonstrating the two-way data binding with React Hook. | |
import { useLink } from 'valuelink' | |
import * as React from 'react' | |
export const MyCoolComponent = () => { | |
const name = useLink( '' ); | |
return ( | |
<input {...name.props} /> | |
) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment