Skip to content

Instantly share code, notes, and snippets.

@dwalkr
Created June 2, 2020 13:58
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/9a4b10c2b422ef1412c7424101a25a1e to your computer and use it in GitHub Desktop.
Save dwalkr/9a4b10c2b422ef1412c7424101a25a1e to your computer and use it in GitHub Desktop.
export const Page = (props) => {
const [foo, setFoo] = useState('foo')
useForm({
//...
loadInitialValues: async () => {
setFoo('bar')
console.log(foo) // 'bar'
}
onSubmit: async (values) => {
console.log(foo) // 'foo'
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment