Skip to content

feat: lazy loading / code splitting for screens (#144)#201

Merged
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
omonxooo-commits:feat/lazy-loading-issue-144
Apr 28, 2026
Merged

feat: lazy loading / code splitting for screens (#144)#201
RUKAYAT-CODER merged 4 commits into
rinafcode:mainfrom
omonxooo-commits:feat/lazy-loading-issue-144

Conversation

@omonxooo-commits
Copy link
Copy Markdown
Contributor

Summary

Resolves #144 — No Lazy Loading

Changes

  • src/utils/LazyScreen.tsx — New utility wrapping React.lazy + Suspense with an ActivityIndicator fallback
  • src/screens/index.tsMobileLogin, PaymentHistory, and SettingsScreen are now lazy-loaded via dynamic import()
  • src/utils/index.ts — Exports lazyScreen for use across the app
  • app/course-viewer.tsx and app/quiz.tsx already use lazyScreen (no changes needed)

How it works

  • expo-router automatically splits each app/*.tsx route into its own JS bundle
  • lazyScreen adds component-level splitting for heavy screens within routes using React.lazy + dynamic import()
  • newArchEnabled: true in app.json enables concurrent React features required for Suspense
  • babel-preset-expo handles Metro bundler code splitting for dynamic imports

- Add lazyScreen() utility wrapping React.lazy + Suspense
- Lazy-load MobileCourseViewer and MobileQuizManager in route files
- Convert src/screens/index.ts barrel to lazy exports
- Add lazyScreen utility using React.lazy + Suspense
- Lazy-load MobileLogin, PaymentHistory, SettingsScreen in src/screens
- Export lazyScreen from src/utils/index.ts
- app/course-viewer.tsx and app/quiz.tsx already use lazyScreen
- expo-router provides automatic per-route splitting; lazyScreen adds
  component-level splitting for heavy screens within routes
@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Apr 28, 2026

@omonxooo-commits 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 RUKAYAT-CODER merged commit 1415ac6 into rinafcode:main Apr 28, 2026
0 of 3 checks passed
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.

No Lazy Loading

2 participants