-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unnecessary Re-renders in SearchBox Component #53
Comments
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? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: