Framework App to Web App: Part Six - Mocking, DRAPI and CORS
In the last part, we created for login form and added an eventHandler to call formLogin()
function. However, we didn't go into the code behind that function. That function is pretty basic, offloading the bulk of the processing:
const formLogin = () => {
let username = document.getElementById("username-input").value;
let password = document.getElementById("password-input").value;
login(username, password);
};