I am referring to examples on this page and it is pertaining to React preserving state based on different conditions specific to the UI tree.
Specifically, is there any difference in the way React sees the below being rendered dynamically from a UI tree perspective?
-
Option 1:
return ( <div> {isPlayerA ? ( <Counter person="Taylor" /> ) : ( <Counter person="Sarah" /> )} </div> );
-
Option 2:
return ( <div> {isPlayerA && <Counter person="Taylor" />} {!isPlayerA && <Counter person="Sarah" />} </div> );