---
title: "Comment by Ameh Elijah Uma-Ojo on \"Decoding React: Navigating the Intricacies of State Preservation and Resetting\" | Hashnode"
description: "Great piece boss &quot;Never Nest A Component Definition Within Another Component!&quot;. Can you maybe show example of these?."
url: "https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e"
---

[Discussion](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952)

Comment [Decoding React: Navigating the Intricacies of State Preservation and Resetting](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952)

[Ameh Elijah Uma-Ojo](https://hashnode.com/@AmehElijah)

[Jan 4, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e)

Great piece boss

"Never Nest A Component Definition Within Another Component!". Can you maybe show example of these?.

[Chrismarcel James](https://hashnode.com/@Chrismarcel)

[Jan 4, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e#reply-659732071aadc67192572ed1)

Think of having a component definition

```
const OuterDefinition = () => {
   // You then have another definition inside it as thus
   const InnerDefintion = () => {
     // Rest of inner component definitio 
     return ...
   }

   // Rest of outer component definition
   return ...
}
```

Tried formatting it with spaces but it seems Hashnode doesn't preserve whitespaces

[Emmanuel O. Eboh](https://hashnode.com/@EOEboh)

[Jan 5, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e#reply-659753c828780949068ee589)

Yes thank you for helping out with the explanation! [Chrismarcel James](https://hashnode.com/@Chrismarcel)

[Favourite Jome](https://hashnode.com/@Favourite)

[Jan 5, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e#reply-65988be30fe390a9f914453e)

Hey [Chrismarcel James](https://hashnode.com/@Chrismarcel), you make use of markdown. I found your example hard to read, maybe rewrite it with markdown using the triple backtick character

[Chrismarcel James](https://hashnode.com/@Chrismarcel)

[Jan 6, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/659706051aadc6719255d71e#reply-65996f9c0fe390a9f91bc847)

[Favourite Jome](https://hashnode.com/@Favourite) Done.
