October 2019
Intermediate to advanced
426 pages
11h 49m
English
Now it is time to put our user-related components together into a UserBar component. Here we are going to conditionally show either the Login and Register components, or the Logout component, depending on whether the user is already logged in or not.
Let's start implementing the UserBar component:
import React from 'react'import Login from './Login'import Logout from './Logout'import Register from './Register'
export default function UserBar () { const user = ''
Read now
Unlock full access