Open pawansoni007 opened 1 month ago
Hey @pawansoni007 can i work on this issue?
@sahadat-sk no, it's already an ongoing change from my end.
@pawansoni007 can you please check once if this has been fixed in latest build?
Sure I'll check and raise another PR with requested changes.
@lucifercr07 can i take this up?
Issue Description
The
SearchBox
component in our application is re-rendering every second due to a timer in its parent component (Playground
), even when the search state hasn't changed. This may lead to performance issues, especially with larger datasets or more complex rendering logic.Current Behavior
usePlayground
hook inPlayground
sets up a timer that updatestimeLeft
every second.Playground
to re-render every second.SearchBox
re-renders every second, despite its props (search
andsetSearch
) not changing.Expected Behavior
SearchBox
should only re-render when its props (search
orsetSearch
) actually change, not on every tick of the parent component's timer.