Edit in JSFiddle

function LoginForm () {
  const [username, setUsername] = React.useState('')
  const [password, setPassword] = React.useState('')

  function handleUsernameChange (e) {
    setUsername(e.target.value)
  }

  function handlePasswordChange (e) {
    setPassword(e.target.value)
  }

  return (
    <form className='loginForm'>
      <label htmlFor='username'>Username</label>
      <input
        id='username'
        placeholder='username'
        value={username}
        onChange={handleUsernameChange}
      />
      <label htmlFor='password'>Password</label>
      <input
        id='password'
        type='password'
        placeholder='password'
        value={password}
        onChange={handlePasswordChange}
      />
    </form>
  )
}

ReactDOM.render(<LoginForm />, document.querySelector("#app"))