Skip to content
Source
Sign inSign up
TanStack/form
Open History to see the last commit

AppForm.svelte

14 lines323 Bytes

1<script lang="ts">
2 import { setContext, untrack, type Snippet } from 'svelte'
3 import { formContextKey } from '../context-keys.js'
4​
5 interface Props {
6 form: any
7 children: Snippet
8 }
9​
10 const { children, form }: Props = $props()
11 setContext(formContextKey, untrack(() => form))
12</script>
13​
14{@render children()}