Skip to content

feat: optimize Next.js Link prefetch behavior for better performance - #311

Merged
Naomi-Gift merged 2 commits into
HubDApp:mainfrom
Zarmaijemimah:feature/testing-updates
Jul 31, 2026
Merged

feat: optimize Next.js Link prefetch behavior for better performance#311
Naomi-Gift merged 2 commits into
HubDApp:mainfrom
Zarmaijemimah:feature/testing-updates

Conversation

@Zarmaijemimah

@Zarmaijemimah Zarmaijemimah commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Closes #270


feat: optimize Next.js Link prefetch behavior for better performance

- Create prefetch configuration system with route categories
- Implement mobile/low-power device detection
- Add getPrefetchValue() for smart prefetch decisions per route type
- Update ProjectCard to use hover-only prefetch for heavy project detail pages
- Update Navbar with optimized prefetch for navigation links
- Add prefetch strategies: viewport, hover-only, or disabled per route

Strategy per route category:
- Landing pages: Always prefetch (lightweight, frequently accessed)
- Navigation links: Prefetch on desktop, hover-only on mobile
- Project details: Hover-only on desktop, disabled on mobile (heavy routes)
- Transaction flows: Disabled (blockchain code loads on-demand)
- Admin pages: Disabled (rare access)
- Static pages: Hover-only (lightweight, sufficient)

Benefits:
- Project detail navigation from cards feels fast (hover prefetch)
- Heavy routes not prefetched unnecessarily on mobile
- Reduced bandwidth usage for mobile/low-power users
- Navigation remains instant on desktop
- Prefetch choices documented in lib/prefetch-config.ts
@Zarmaijemimah

Copy link
Copy Markdown
Contributor Author

close #270

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@Zarmaijemimah 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

@Naomi-Gift
Naomi-Gift merged commit 321b5c4 into HubDApp:main Jul 31, 2026
0 of 2 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.

Add route prefetch strategy for high-intent navigation

2 participants