Skip to content

Conversation

@marcodejongh
Copy link
Owner

  • Replace individual useFavorite() hook per ClimbCard with single
    useFavoritesBatch() call at list level, reducing N API requests to 1
  • Add optimistic update state management for immediate UI feedback
  • Remove useFavorite hook from ClimbCardActions, pass isFavorited as prop
  • Add React.memo wrapper to ClimbCardActions for better memoization
  • Update ClimbCard props and memo equality to include favorites state

This significantly improves initial render performance by eliminating
the waterfall of individual SWR requests for each visible climb card.

- Replace individual useFavorite() hook per ClimbCard with single
  useFavoritesBatch() call at list level, reducing N API requests to 1
- Add optimistic update state management for immediate UI feedback
- Remove useFavorite hook from ClimbCardActions, pass isFavorited as prop
- Add React.memo wrapper to ClimbCardActions for better memoization
- Update ClimbCard props and memo equality to include favorites state

This significantly improves initial render performance by eliminating
the waterfall of individual SWR requests for each visible climb card.
@vercel
Copy link

vercel bot commented Dec 26, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
boardsesh Ready Ready Preview, Comment Dec 26, 2025 11:16am

React.memo wraps components, but ClimbCardActions is called as a function
to produce an actions array for Ant Design Card. The memo wrapper caused
the function to return a ReactElement instead of the expected array.
@marcodejongh marcodejongh merged commit 8ed6f50 into main Dec 26, 2025
4 checks passed
marcodejongh added a commit that referenced this pull request Dec 26, 2025
marcodejongh added a commit that referenced this pull request Dec 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants