---
title: "Discussion on \"Improving performance of React component | using less state variables\" | Hashnode"
description: "Discussion on \"Improving performance of React component | using less state variables\". Great performance is never a luck, it takes a lot of focus, heart and hard work -  someone said"
url: "https://hashnode.com/posts/improving-performance-of-react-component-or-using-less-state-variables/6215c0342c936b90065dc689"
---

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

Discussion

# [Improving performance of React component | using less state variables](https://akash-js.hashnode.dev/improving-performance-of-react-component-or-using-less-state-variables?utm_source=hashnode&utm_medium=feed)

Great performance is never a luck, it takes a lot of focus, heart and hard work - someone said

Feb 23, 2022 · 2 min read · akash-js.hashnode.dev  
Read the article

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

## Written by

[Akash Bhandwalkar](https://hashnode.com/@akash19)

@akash19 · Pune, India

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

Front End Developer

## Responses 2

Markdown supported · ⌘↵ to post

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

[Feb 25, 2022](https://hashnode.com/posts/improving-performance-of-react-component-or-using-less-state-variables/6215c0342c936b90065dc689/comment/62196d19085330c3f79c01d7)

An awesome library I love using when it comes to handling forms is the **react-hook-form** library. It makes things a lot easier and also makes use of ref behind the scene.

[Andrii Shupta](https://hashnode.com/@andriishupta)

[Feb 23, 2022](https://hashnode.com/posts/improving-performance-of-react-component-or-using-less-state-variables/6215c0342c936b90065dc689/comment/6216200d2c936b90065dd304)

Hello 👋

Thanks for the article, but IMHO this shouldn't be used as an approach to what React could "control" - Controlled vs. [Uncontrolled components](https://reactjs.org/docs/uncontrolled-components.html).

We are losing other possibilities like instant validation, conditional work with input(show/hide/disable something), formatting(like a phone), several values for different inputs, etc. You would still need to handle additional events and via `value` + `onChange` is better than direct DOM manipulation.

UPDATE for the last paragraph: These re-render are expected, such you have changed input 7 times - this is how [reconciliation](https://reactjs.org/docs/reconciliation.html) works.

PREVIOUS general knowledge: Also, re-renders could happen from something above in most cases: providers, settings, stores, etc. - you could avoid this by doing [memorizing](https://reactjs.org/docs/react-api.html#reactmemo) for components with unchanged props if you need (but in general, these updates don't have such impacts on performance and we let React do its work).

[Akash Bhandwalkar](https://hashnode.com/@akash19)

[Feb 23, 2022](https://hashnode.com/posts/improving-performance-of-react-component-or-using-less-state-variables/6215c0342c936b90065dc689/comment/6216200d2c936b90065dd304#reply-62162ed52c936b90065dd4ff)

I agree with you Andrii. If we move away from react's way to handle forms, we loose a lot of power.

The use case of ref would be very limited.
