Skip to content

perf(#374): implement React component memoization to reduce unnecessa…#470

Open
MorsH14 wants to merge 1 commit into
rinafcode:mainfrom
MorsH14:perf/issue-374-react-memoization
Open

perf(#374): implement React component memoization to reduce unnecessa…#470
MorsH14 wants to merge 1 commit into
rinafcode:mainfrom
MorsH14:perf/issue-374-react-memoization

Conversation

@MorsH14
Copy link
Copy Markdown

@MorsH14 MorsH14 commented May 29, 2026

Closes #374


…ry re-renders

  • Wrap MobileSearch, MobileProfile, SearchResultCard, AppText with React.memo
  • Memoize screenOptions in TabLayout to prevent tab bar re-renders
  • Stabilize all event handlers with useCallback across MobileProfile, MobileSearch, MobileCourseViewer
  • Memoize allLessons flatMap and statsForDisplay/stripItems computations with useMemo
  • Replace full-store useAchievementStore subscription with granular useUnlockedCount selector
  • Fix AppText useMemo to depend on fontScale (number) rather than unstable scale function reference
  • Add granular selector hooks to achievementStore (useAchievements, useUnlockedCount)
  • Fix LessonCarousel parse error (missing arrow) and wire up onScroll handler
  • Fix Rules of Hooks violation in MobileProfile (hoist all hooks before early return)
  • Fix import ordering and unused variable warnings across all modified files

…unnecessary re-renders

- Wrap MobileSearch, MobileProfile, SearchResultCard, AppText with React.memo
- Memoize screenOptions in TabLayout to prevent tab bar re-renders
- Stabilize all event handlers with useCallback across MobileProfile, MobileSearch, MobileCourseViewer
- Memoize allLessons flatMap and statsForDisplay/stripItems computations with useMemo
- Replace full-store useAchievementStore subscription with granular useUnlockedCount selector
- Fix AppText useMemo to depend on fontScale (number) rather than unstable scale function reference
- Add granular selector hooks to achievementStore (useAchievements, useUnlockedCount)
- Fix LessonCarousel parse error (missing arrow) and wire up onScroll handler
- Fix Rules of Hooks violation in MobileProfile (hoist all hooks before early return)
- Fix import ordering and unused variable warnings across all modified files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented May 29, 2026

@MorsH14 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@RUKAYAT-CODER
Copy link
Copy Markdown
Contributor

Kindly resolve conflict and fix workflow.

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.

Implement efficient component tree memoization with React DevTools

2 participants