Skip to content

Instantly share code, notes, and snippets.

@tpetrina
Last active September 26, 2017 15:20
Show Gist options
  • Save tpetrina/20c4e51f4fa0c020f20287175bfa3b40 to your computer and use it in GitHub Desktop.
Save tpetrina/20c4e51f4fa0c020f20287175bfa3b40 to your computer and use it in GitHub Desktop.
React form complication 3
let registration = {
username: "",
password: "",
isRegistering: false,
onRegister: r => {
// login(r.username, r.password).then()...
r.setState({ isRegistering: true })
setTimeout(() => {
r.setState({ isRegistering: false })
}, 2000)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment