Precognition + Inertia <Form> — prefer adapter hooks in Inertia, or wrapper in laravel/precognition? #2556
kaspernowak
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
Laravel starter kits moved from
useForm
to the new Inertia<Form>
; Precognition currently targetsuseForm
, so there’s no first-class live-validation path for<Form>
. I created two PRs with separate approaches to solve this problem:Option A — Adapter in Inertia (provider-driven)
<Form>
(precognitive
,validateOn
,validationTimeout
) and a provider registry so integrations like Precognition can plug in without hard-coding Laravel specifics. Keeps Inertia agnostic.Option B — Wrapper in laravel/precognition
<PrecognitionForm>
that composes Inertia’s<Form>
and wires live validation (per-field opt-in, debounce, normalized errors). Keeps changes out of Inertia; Precognition owns the integration.Questions for Inertia maintainers
setError/clearErrors
bridge) in core? This enables Laravel Precognition (and others) while staying framework-agnostic.Beta Was this translation helpful? Give feedback.
All reactions