Skip to contentView the source on GitHub

no-client-load-overuse

Prefer client:idle or client:visible over client:load for interactive islands.

Performancewarning by default ESLint rule

astro-doctor/no-client-load-overuse

Why it matters

client:load hydrates the component immediately, blocking the main thread during page startup. client:idle waits for the browser to be idle; client:visible waits until the element enters the viewport — both give the critical path a head start.

See the difference

Incorrect

Uses client:load unnecessarily

astroIncorrect example
---
import Counter from '../components/Counter'
---
<Counter client:load />

Correct

Uses client:idle (below the fold) or client:visible

astroCorrect example
---
import Counter from '../components/Counter'
---
<!-- Below-the-fold component: hydrate when browser is idle -->
<Counter client:idle />

<!-- Only visible when scrolled into view -->
<Counter client:visible />

Configure this check

Override the default severity in your ESLint config:

javascripteslint.config.js
import astroDoctorPlugin from '@santi020k/eslint-plugin-astro-doctor'

export default [
  astroDoctorPlugin.configs.recommended,
  {
    rules: {
      'astro-doctor/no-client-load-overuse': 'error',
    },
  },
]

Or set the severity for CLI scans in doctor.config.ts:

typescriptdoctor.config.ts
export default {
  rules: {
    'astro-doctor/no-client-load-overuse': 'error',
  },
}

Use 'error', 'warn', or 'off'. The configuration guide covers presets and per-file overrides.

Keep exploring performance

Browse every rule and project audit