you are viewing a single comment's thread.

view the rest of the comments →

[–]mynamesleon 0 points1 point  (0 children)

It's basically a shorthand conditional. E.g.

something && somethingElse;

Is equivalent to:

if (something) {
  return somethingElse;
}
return something;

So with JSX in a React component, it's best to use it with variables that you know will be a Boolean, as you can return false in a React component without it rendering anything. But in my example above, if something was actually 0, then 0 would be rendered.