---
title: "Discussion on \"What is Immutability in React?\" | Hashnode"
description: "Discussion on \"What is Immutability in React?\". Objects are mutable in nature, but while working in React we need to create a copy of the object so that comparison can be done."
url: "https://hashnode.com/posts/what-is-immutability-in-react/61f8d8e4f6fc410f642301ca"
---

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

Discussion

# [What is Immutability in React?](https://nsblog.hashnode.dev/what-is-immutability-in-react?utm_source=hashnode&utm_medium=feed)

Objects are mutable in nature, but while working in React we need to create a copy of the object so that comparison can be done.

Feb 1, 2022 · 3 min read · nsblog.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#frontend](https://hashnode.com/tag/frontend)
-   [#redux](https://hashnode.com/tag/redux)

## Written by

[Navdeep Singh](https://hashnode.com/@navdeep)

@navdeep · Amritsar, India

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

Full Stack Developer - JavaScript

I am a self taught web developer owning experience of 12+ years in web development field.

## Responses 3

Markdown supported · ⌘↵ to post

[mary lee](https://hashnode.com/@leemarry)

[Apr 13, 2023](https://hashnode.com/posts/what-is-immutability-in-react/61f8d8e4f6fc410f642301ca/comment/6437cb643878859a093cc6f3)

You are allowed an unlimited number of guesses while playing the game Contexto, in which you are tasked with figuring out the meaning of a concealed word. [contextogame.io](https://contextogame.io/)

[Lorde Laura](https://hashnode.com/@lorde123)

[Jan 12, 2023](https://hashnode.com/posts/what-is-immutability-in-react/61f8d8e4f6fc410f642301ca/comment/63bfcadda54681f9eea762b4)

An immutable variable can never be changed. [melonplayground.co](https://melonplayground.co/) To update its value, you create a new variable. The same applies to objects and arrays. Instead of changing an array, to add a new item you create a new array by concatenating the old array, plus the new item. An object is never updated, but copied before changing it.

[Otis Jame](https://hashnode.com/@otis123)

[Sep 22, 2022](https://hashnode.com/posts/what-is-immutability-in-react/61f8d8e4f6fc410f642301ca/comment/632c1d52318ff0fa18336bbf)

Immutability is a concept that [framedgame.io](https://framedgame.io/) React programmers need to understand. An immutable value or object cannot be changed, so every update creates new value, leaving the old one untouched
