Closed Bersaelor closed 1 year ago
So the solidjs form validation example uses directives.
When I put a console.log into the validate function it gets printed for:
console.log
validate
<input name="email" type="email" placeholder="Email" required use:validate={[emailInValid]} />
when I however put the use:validate on a <TextField> nothing happens:
use:validate
<TextField>
<TextField name="email" type="email" placeholder="Email" component='input' required use:validate={[emailInValid]} />
Is there a trick on how to use directives with suid?
SolidJS directives
Important: use: is detected by the compiler to be transformed, and the function is required to be in scope, so it cannot be part of spreads or applied to a component.
So the solidjs form validation example uses directives.
When I put a
console.log
into thevalidate
function it gets printed for:when I however put the
use:validate
on a<TextField>
nothing happens:Is there a trick on how to use directives with suid?