|
|
|
|
|
by alangpierce
2720 days ago
|
|
Part of the point of solutions #1 and #3 is that they pass in exactly the same function on each render, so it's possible to avoid unnecessary rendering further down by knowing that the props are the same as before. The hooks solution will make a new handleChange closure each time, so it'll be a different function. Is there are way with hooks to pass the same function each time? |
|
Additional reading: https://reactjs.org/docs/hooks-faq.html#are-hooks-slow-becau....