The Truth Table in React

true && <Component/> {/* will render the component*/}false && <Component/> {/* will hide the component*/}
true && true => true false && true => false 
data={false || []} {/* sends the empty array to Blog component */}
false || true => true
true || true => true

|| behaviour is to return the first truthy value, opposite to && which returns last truthy value

data={true || []} {/* sends posts array to Blog component*/}

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store