perf: API docs: do not rerender entire page when searching
Created by: slimsag
React.FunctionComponent
always rerenders the component, even if props
have not changed. This is an issue with a LOT of components in Sourcegraph,
and in the case of API docs surfaces as "typing in the search bar makes the
entire page stall/stutter/lag"
This fixes it by using React.memo
, see #21200 (closed) for details.
Helps #21200 (closed)
Signed-off-by: Stephen Gutekanst [email protected]