0Pricing
Sveltejs Academy · Lesson

The use:enhance Directive

Progressively enhance form submissions with client-side fetch, no full reload.

Progressive Enhancement

Forms work without JS; use:enhance upgrades them to fetch-based submissions for snappy UX.

Import enhance

From $app/forms.

import { enhance } from "$app/forms";

All lessons in this course

  1. +page.server.js with actions
  2. The use:enhance Directive
  3. Progressive Enhancement for Forms
  4. Handling Validation Errors in Actions
← Back to Sveltejs Academy