Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Performance issue with React controlled components

Tags:

reactjs

I have been using react's controlled components in my application and .

But I am noticing that as I enter more and more inputs to these form components my page is slowing down badly or even hangs sometime.

Any clue ?

like image 984
Jyoti Puri Avatar asked Apr 18 '26 17:04

Jyoti Puri


1 Answers

Sounds like you should look into the key="" attribute. Most often when react starts to slow down it is related to it doing more work than necessary. Another way to improve performance is implementing shouldComponentUpdate, but that should first be necessary later on.

like image 68
Emil Ingerslev Avatar answered Apr 21 '26 07:04

Emil Ingerslev



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!