Created
January 30, 2019 19:21
-
-
Save AndrewIngram/21ce14ac21df88a253bd7e9908e56797 to your computer and use it in GitHub Desktop.
Login Hook usage
This file contains 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
import React from "react"; | |
import useLogin from "@zego/hooks/useLogin"; | |
import BaseLoginForm from "./BaseLoginForm"; | |
import { withTrackableFeature } from "@zego/tracking"; | |
const LoginFormImpl = props => { | |
const login = useLogin(); | |
return ( | |
<BaseLoginForm | |
{...props} | |
onSubmit={(values, onComplete) => login(values, onComplete)} | |
/> | |
); | |
}; | |
export default withTrackableFeature("Login Form")(LoginFormImpl); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment