Skip to content

Instantly share code, notes, and snippets.

@dwalkr
Created June 4, 2020 15:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dwalkr/81d8c531643563b28be32063879f5fe3 to your computer and use it in GitHub Desktop.
Save dwalkr/81d8c531643563b28be32063879f5fe3 to your computer and use it in GitHub Desktop.
const { loadData, commit } = useGithubFile({
path: 'src/content/home.json',
parse: JSON.parse,
serialize: JSON.stringify,
})
useForm({
//...
onSubmit: async (values: any) => commit(values),
loadInitialValues: loadData,
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment