📌 Description
src/components/MyCommitmentsGrid.tsx and src/components/MarketplaceGrid.tsx
re-render every card on each filter/sort change because card components are not
memoized and inline callbacks/derived data are recreated on each render. With
large lists this produces visible jank during filtering.
This issue memoizes card components and stabilizes derived data/callbacks so only
changed cards re-render.
🎯 Requirements and Context
- Wrap
MyCommitmentCard and MarketplaceCard in React.memo with stable props.
- Memoize filtered/sorted derivations with
useMemo; stabilize callbacks with
useCallback.
- Use stable keys (not array index) for list items.
- No behaviour change; measurable reduction in re-renders.
🛠️ Suggested Execution
1. Fork the repo and create a branch
git checkout -b perf/memoize-grids
2. Implement changes
- Apply memoization to the two grids and their cards.
- Add
src/components/__tests__/GridMemoization.test.tsx using render counters /
spies to assert unchanged cards do not re-render on filter changes.
- Add
docs/performance/GRID_RENDER.md documenting the before/after render counts.
- Validate filtering/sorting still works identically.
3. Test and commit
- Run
pnpm test.
- Cover edge cases: empty results, single-item change, full-list change,
sort-only change.
Example commit message
perf: memoize MyCommitmentsGrid and MarketplaceGrid cards
✅ Guidelines
- Minimum 95% test coverage on new/changed lines.
- Clear, reviewer-friendly documentation.
- Timeframe: 96 hours.
🏷️ Labels
type-performance · area-frontend · MAYBE REWARDED · GRANTFOX OSS ·
OFFICIAL CAMPAIGN
💬 Community & Support
- Join the CommitLabs contributor Discord to coordinate and get unblocked fast:
https://discord.gg/WV7tdYkJk
- Introduce yourself before starting so we can avoid duplicate work and pair you
with a reviewer. Maintainers triage actively and review fast.
📌 Description
src/components/MyCommitmentsGrid.tsxandsrc/components/MarketplaceGrid.tsxre-render every card on each filter/sort change because card components are not
memoized and inline callbacks/derived data are recreated on each render. With
large lists this produces visible jank during filtering.
This issue memoizes card components and stabilizes derived data/callbacks so only
changed cards re-render.
🎯 Requirements and Context
MyCommitmentCardandMarketplaceCardinReact.memowith stable props.useMemo; stabilize callbacks withuseCallback.🛠️ Suggested Execution
1. Fork the repo and create a branch
2. Implement changes
src/components/__tests__/GridMemoization.test.tsxusing render counters /spies to assert unchanged cards do not re-render on filter changes.
docs/performance/GRID_RENDER.mddocumenting the before/after render counts.3. Test and commit
pnpm test.sort-only change.
Example commit message
✅ Guidelines
🏷️ Labels
type-performance·area-frontend·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support
https://discord.gg/WV7tdYkJk
with a reviewer. Maintainers triage actively and review fast.