I want to know if conditional rendering between 3 page component is a professional way or should I do it different ?
Header is the navbar but I want it disappear when signIn or signUp page components will show.
With SignUp for now its like that -
//userAccount is a Boolean
return (
<div> {userAccount ? (
<SignUp />
) : (
<>
<Header/>
<Switch>
<Route exact path='/'>
<Home />
</Route>
<Route exact path='/search'>
<Search/>
</Route>
</> )
<div/>
When I add a SignIn page component I will have 2 conditions. I think it will look ugly & unprofessional.
Should I do an Auth Component where SignUp and SignIn will be shown - each by an authentication ?