March 2019
Beginner to intermediate
324 pages
7h 17m
English
Let's go back to the navigation.js file that was in our src folder. We already wrote a Navigation React component there in the The navigational menu section, which included the default navigation menu if the user is not logged in. We now need to add the pieces that should show up when a user is logged in. The first step is to write a new method, called buildLoggedInMenu(), which will show the Welcome <user> drop-down button, as well as the sign out option.
Inside the Navigation React component, let's add the new method:
buildLoggedInMenu(){ return ( <div className="navbar-brand order-1 text-white my-auto"> <div className="btn-group"> <button type="button" className="btn btn-success dropdown-toggle" data-toggle="dropdown" ...Read now
Unlock full access