import React, { useState, useCallback } from 'react' import { useAuthContext } from 'auth-context-provider' const FormLogin = () => { const [username, setUsername] = useState('') const [password, setPassword] = useState('') const auth: any = useAuthContext() const onSubmit = useCallback( (authenticationInfo) => { auth.login(authenticationInfo) }, [auth] ) return ( <>
{ e.preventDefault() onSubmit({ username, password }) }} > { setUsername(e.target.value) }} /> { setPassword(e.target.value) }} />

        {JSON.stringify(auth)}
      
) } export default FormLogin