Skip to content
Source
Sign inSign up
TanStack/form

feat(solid-form): target Solid 2 #2464

Openryansolid(GitHub profile, opens in a new tab)wants to merge 1 commit intoalpha fromrefs/pull/2464/headopened

Showing 70 changed files with 34 additions and 87 deletions (loading 66).

x
0 of 70 viewed, 70 left
11 additions and 0 deletions.changeset/solid-form-solid-2.mdAdded
View file
@@ -0,0 +1,11 @@
+---
+'@tanstack/solid-form': patch
+---
+​
+BREAKING: `@tanstack/solid-form` now targets Solid 2 and no longer supports Solid 1.
+​
+Migration:
+​
+- upgrade to Solid 2 (`solid-js` and `@solidjs/web` 2.0)
+- import `render` and JSX types from `@solidjs/web` instead of `solid-js/web`
+- `useSelector` and `useStore` are now exported by `@tanstack/solid-form` itself, which no longer depends on `@tanstack/solid-store`
21 additions and 85 deletionsdocs/framework/solid/guides/async-initial-values.mdModified
View file
@@ -4,13 +4,12 @@
---
​
Forms often edit data loaded from an API. A server-state library such as
-TanStack Query should own fetching, caching, loading, and retries; TanStack Form
+TanStack Query (`@tanstack/solid-query` v6 for Solid 2) should own fetching, caching, loading, and retries; TanStack Form
should own the editable copy.
​
-There are two supported ways to provide async initial values: wait to create the
-form until the data is ready, or create it immediately with complete fallback
-values. Choose the approach that best matches the loading experience your UI
-needs.
+In Solid 2, wait to create the form until the data is ready. Query data is
+async, so don't read it inside the `createForm` options: those options are read
+when the form is created, before the data has loaded.
​