My React Search Box Froze on Every Keystroke. I Fixed It by Stealing Python's #1 Scope Rule.

One search box made my whole React dashboard feel broken. Every keypress landed late. Almost 300ms late. My first instinct was the same one a lot of React developers have: memoize everything. useMemo? useCallback? Wrap half the app in React.memo and hope the smoke clears? That was my first instinct. It was also the wrong one. The app was not huge. It was a side-project dashboard with roughly 150 components: a sidebar, a header, a data table, a few charts, filters, settings panels, the usual litt