# Lesson 7- Updating Nested Objects from React TypeScript

**URL:** <https://forum.codewithmosh.com/t/lesson-7-updating-nested-objects-from-react-typescript/24848>\
**Category:** TypeScript\
**Created:** [January 30, 2024, 1:02pm UTC](https://forum.codewithmosh.com/t/lesson-7-updating-nested-objects-from-react-typescript/24848 "2024-01-30T13:02:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Wicho](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.codewithmosh.com/wicho/32/7680_2.png) [@Wicho](https://forum.codewithmosh.com/u/Wicho)\
**Post date:** [January 30, 2024, 1:02pm UTC](https://forum.codewithmosh.com/t/lesson-7-updating-nested-objects-from-react-typescript/24848/1 "2024-01-30T13:02:36Z")

</div>

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)} /\>  
)}
