---
title: "Discussion on \"Decoding React: Navigating the Intricacies of State Preservation and Resetting\" | Hashnode"
description: "Discussion on \"Decoding React: Navigating the Intricacies of State Preservation and Resetting\". Understanding React State Behavior For Better Performance"
url: "https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Decoding React: Navigating the Intricacies of State Preservation and Resetting](https://captain-eo.hashnode.dev/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting?utm_source=hashnode&utm_medium=feed)

Understanding React State Behavior For Better Performance

Jan 4, 2024 · 6 min read · captain-eo.hashnode.dev  
Read the article

-   [#state-management](https://hashnode.com/tag/state-management)
-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#rendering](https://hashnode.com/tag/rendering)
-   [#performance](https://hashnode.com/tag/performance)

## Written by

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

@EOEboh

  
[View profile](https://hashnode.com/@EOEboh)

Software development and Technical Writing

A software developer and technical writer who loves breaking down complex concepts into concise, understandable form.

## Responses 4

Markdown supported · ⌘↵ to post

[Praveen V](https://hashnode.com/@praveen20)

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

[devtohash.hashnode.dev/frontend-development-pract…](https://devtohash.hashnode.dev/frontend-development-practice-html-and-css)

[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/65988d39236889da2dade14c)

I don't think I have ever then taken advantage of the "Key" prop with the example you gave [Emmanuel O. Eboh](https://hashnode.com/@EOEboh).

Just out of curiosity, if the key props weren't used what would have happened?

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

[Jan 7, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/65988d39236889da2dade14c#reply-659a8aa40fe390a9f922b83d)

The state would have been preserved. Feel free to check the React docs for more examples on how you can utilize the key prop.

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

[Jan 7, 2024](https://hashnode.com/posts/decoding-react-navigating-the-intricacies-of-state-preservation-and-resetting/6596fc403934c57833617952/comment/65988d39236889da2dade14c#reply-659afbf45a246ab4fe961714)

Alright, make sense [Emmanuel O. Eboh](https://hashnode.com/@EOEboh)

[Coding Pastor](https://hashnode.com/@codingpastor)

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

Nice article Captain. It really gives detailed explanation of how state is tracked, preserved and destroyed in React.

[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/65971c9528780949068dd92d#reply-659753e228780949068ee601)

Thank you for the kind feedback! it means a lot to me.

[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?.

[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.

[Tobiloba Adedeji](https://hashnode.com/@tobySolutions)

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

I certainly wasn't aware of this. Thank you so much for such an amazing article!!!

Let me submit this to daily dev, more people deserve to know this.

[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/6596ffe828780949068ce092#reply-6597533c28780949068ee442)

Thank you so much Tobi, I just updated the article, so feel free to submit it!
