Guides / Troubleshooting

Troubleshooting

onIntent never fires

  • Is IntentProvider mounted above these links?
  • Does the target have an onIntent callback? Targets without one are not registered.
  • Move the pointer on desktop or scroll on mobile. The engine sleeps until the first interaction.
  • Make sure the target is visible and has a real width and height.
  • Temporarily try importance="high" and cost="low" to confirm the integration, then restore the defaults.

A route prefetches without onIntent

Check for another Next.js Link pointing to the same route, including links hidden by responsive styles. Also check application code that calls router.prefetch() directly.

A custom component does not work

The component must forward the ref to a real HTML element. If it does not, attach the intent ref to a native wrapper such as a div.

Testing on mobile

Use a real touch device or enable touch emulation in browser developer tools, then scroll. Merely narrowing a desktop browser window does not necessarily enable mobile behavior.

Development and production

Test important behavior in a production build too. React development checks and framework tooling can make callbacks and network requests look different from production.