-
Notifications
You must be signed in to change notification settings - Fork 55
Open
Description
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
- The
usePlaygroundhook inPlaygroundsets up a timer that updatestimeLeftevery second. - This causes
Playgroundto re-render every second. - Consequently,
SearchBoxre-renders every second, despite its props (searchandsetSearch) not changing.
Expected Behavior
SearchBox should only re-render when its props (search or setSearch) actually change, not on every tick of the parent component's timer.
Metadata
Metadata
Assignees
Labels
No labels