The article in general is great, covers a lot of mistakes devs can make, just one thought that can easily solve the problems:
Generating componenets dynamically inside components/hooks is bad practice. Should be avoided in almost every case. Instead the Dialog component can be separated and it can expose API through its ref. This is a method a lot of 3rd party libraries are using for performance reasons.
I agree in general, creating components is usually quite bad :) But in the article most of the performance problems come not from it, but using hooks in not the most optimal way
Yes, that's just a sidenote :) However, having state management inside the component and exposing the API through ref resolves the performance concerns.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The article in general is great, covers a lot of mistakes devs can make, just one thought that can easily solve the problems:
Generating componenets dynamically inside components/hooks is bad practice. Should be avoided in almost every case. Instead the Dialog component can be separated and it can expose API through its ref. This is a method a lot of 3rd party libraries are using for performance reasons.
I agree in general, creating components is usually quite bad :) But in the article most of the performance problems come not from it, but using hooks in not the most optimal way
Yes, that's just a sidenote :) However, having state management inside the component and exposing the API through ref resolves the performance concerns.