---
title: "Discussion on \"Why React renders?\" | Hashnode"
description: "Discussion on \"Why React renders?\". A dive deep into how and why react renders to understand and avoid unnecessary renders in react"
url: "https://hashnode.com/posts/why-react-renders/64d7883feacd4627cb2212be"
---

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

Discussion

# [Why React renders?](https://sakshichaudhary.hashnode.dev/why-react-renders?utm_source=hashnode&utm_medium=feed)

A dive deep into how and why react renders to understand and avoid unnecessary renders in react

Aug 12, 2023 · 5 min read · sakshichaudhary.hashnode.dev  
Read the article

-   [#reactjs](https://hashnode.com/tag/reactjs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#css](https://hashnode.com/tag/css)
-   [#developer](https://hashnode.com/tag/developer)

## Written by

[Sakshi Chaudhary](https://hashnode.com/@sakshiChaudhary)

@sakshiChaudhary · India🇮🇳

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

I am a React Developer. I intend to provide helpful content to dev community.

I am a FrontEnd Developer from India exploring my way in ReactJs.

## Responses 1

Markdown supported · ⌘↵ to post

[An Vo](https://hashnode.com/@anvodev)

[Aug 12, 2023](https://hashnode.com/posts/why-react-renders/64d7883feacd4627cb2212be/comment/64d7aefa102c3648a77c758e)

Nice about the tricky thing that inside the `handleClick` function, the alert(theme) is "light" even though we've just `setTheme("dark")`

[Sakshi Chaudhary](https://hashnode.com/@sakshiChaudhary)

[Aug 13, 2023](https://hashnode.com/posts/why-react-renders/64d7883feacd4627cb2212be/comment/64d7aefa102c3648a77c758e#reply-64d86f5dd459393b57af9fd2)

Thank you! glad you find it useful
