Skip to content

Instantly share code, notes, and snippets.

@calincrist
Created April 15, 2020 08:03
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 calincrist/a40ddb5dce09773713bde422eefa82c1 to your computer and use it in GitHub Desktop.
Save calincrist/a40ddb5dce09773713bde422eefa82c1 to your computer and use it in GitHub Desktop.
// src/screens/Login.js
// …imports
const Login = () => {
const { navigate } = useNavigation();
const [email, setEmail] = useState('');
const [password, setPassword] = useState('')
const loginAction = async () => {
// validate inputs…
// api call for signing in…
navigate('SignedIn');
await Analytics.onSignIn({ id: "1", email })
}
return (
// …
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment