Fix React rendering ‘0’ when using short circuit evaluation (&&)

James Brightman
JavaScript in Plain English
4 min readApr 14, 2023

--

Short circuit evaluation is a great feature of React, but it can often cause unnecessary rendering and a few headaches!

This cat is not at all related to the article, I just thought it looked cute.

I’m a big fan of short circuit evaluation in React. It’s simple, readable, and allows for conditional rendering and inline logic instead of resorting…

--

--

I write about stuff I find interesting. Usually WebDev, React and occasionally Finance.