Skip to content

Instantly share code, notes, and snippets.

@gaperton
Created April 23, 2019 21:52
Show Gist options
  • Save gaperton/64310c6b10994d349095a78452b1e742 to your computer and use it in GitHub Desktop.
Save gaperton/64310c6b10994d349095a78452b1e742 to your computer and use it in GitHub Desktop.
// 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