My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

React: Multiple or ( || ) operator rendering not working.

Mrudang Shah's photo
Mrudang Shah
·May 10, 2019

I need to render my components with conditional rendering. I am applying a or ( || ) operator for applying a condition. But the condition is not working anyhow.

{ pathName !== '/login' || pathName !== '/signup' || pathName !== '/account' &&
     <Footer />
}

I have also wrap the conditions in the round brackets but then also it is not working.

{ [(pathName !== '/login') || (pathName !== '/signup') || (pathName !== '/account')] &&
     <Footer />
}

Please let me know what i am doing wrong. ?