When I apply shift+alt+f in react with Javascritp it makes me good code reforms, it tidies it up. But using react with TypeScritp it doesn’t reform, it doesn’t leave me a tidy code.
At time 01:27, Mosh saves the doc and the code is reformatted.
Can you give me advice on how to make these reforms using TypeScript?
Example using React TypeScript:
{love ? <FaHeart color=‘crimson’ fontSize=‘3em’ onClick={() => setLove(false)} />
return <CiHeart color=‘crimson’ fontSize=‘3em’ onClick={() => setLove(true)} />}
Example using React JavaScript:
{love ? (
<FaHeart color=‘crimson’ fontSize=‘3em’ onClick={() => setLove(false)} />
) : (
<CiHeart color=‘crimson’ fontSize=‘3em’ onClick={() => setLove(true)} />
)}