9:12am PDT - October 30th, 2021

The "someExpression && <MyComponent/>" idiom as a way of conditionally rendering a component in React can easily lead to this (spurious 0) as output. If someExpression isn't true, React will render it as 0. Instead do "someExpression ? <MyComponent/>:null" https://t.co/77HyvfEe1n

1 retweets   0 likes  - Cliff Hall ⛓ (@seaofarrows)