I\'m doing some React right now and I was wondering if there is a \"correct\" way to do conditional styling. In the tutorial they use
style={{
  textDecorati         
        
instead of this:
style={{
  textDecoration: completed ? 'line-through' : 'none'
}}
you could try the following using short circuiting:
style={{
  textDecoration: completed && 'line-through'
}}
https://codeburst.io/javascript-short-circuit-conditionals-bbc13ac3e9eb
key bit of information from the link:
Short circuiting means that in JavaScript when we are evaluating an AND expression (&&), if the first operand is false, JavaScript will short-circuit and not even look at the second operand.
It's worth noting that this would return false if the first operand is false, so might have to consider how this would affect your style.
The other solutions might be more best practice, but thought it would be worth sharing.