...

/

Implementing the Login State

Implementing the Login State

Let's learn how to add login functionality to the React frontend.

We'll cover the following...

In this lesson, we’ll replace the hardcoding to reflect the actual login state of a user and also implement a primary login-logout function. The code files created previously have been provided below as a starting point:

import React from 'react'
function Movie() {
    return (
        <div className="App"> 
            Movie
        </div> 
    );
}
export default Movie;
The initial files we will build on

Adding the React hook and login function

Let’s first declare a user state variable using React hooks by adding the code below to the ...