October 2019
Intermediate to advanced
426 pages
11h 49m
English
In the Login component, we just ignore the Password field for now, and only process the Username field.
Let's start by modifying the Login component in order to make it dynamic:
import React, { useState } from 'react'
export default function Login ({ setUser }) {
const [ username, setUsername ] = useState('')
function handleUsername (evt) { setUsername(evt.target.value) }
Read now
Unlock full access