Perf: typing re-renders the whole screen incl. image rows — inventory item detail (QTY/LOC) + POS search #202
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Bug (re-render audit, milder keystroke-driven variant of the scan bug):
inventory/[id].tsx— the always-mounted QTY/LOC hero TextInputs re-render the entire item-detail page on every keystroke, re-rendering the un-memoized per-RCN InstanceRow list (image + badges + a 4-cell metric grid per row) and the GradedPanel (heavy Math.max-spread compute in render body).pos.tsx— the inventory-search FlatList (up to 30 rows, each a remote image) re-renders on every NOTES / discount keystroke because renderItem/keyExtractor are inline and the row isn’t memoized.Fix in progress (feature/josh):
React.memothe rows/panels +useCallbackhandlers +useMemothe heavy derivations. Memoization only, no behavior change.Fixed: typing re-rendered the whole screen incl image rows. inventory/[id].tsx: QTY/LOC moved to a local memoized HeroMetaInput committing to refs so a keystroke re-renders only that input. pos.tsx: useCallback cart handlers, memoized CartRow + RecentSalesBox, useMemo screen options so a search keystroke re-renders only input+filter. Pure memoization, no behavior change. tsc 0. Hot-reloaded; pending on-device verify.