form icon indicating copy to clipboard operation
form copied to clipboard

[solid-form] The async initial values example doesn't work

Open mattp0123 opened this issue 10 months ago • 0 comments

Issue: It won't trigger re-render when the data is loaded.

The doc: https://github.com/TanStack/form/blob/main/docs/framework/solid/guides/async-initial-values.md

Here's the minimal reproduction: https://stackblitz.com/edit/solidjs-templates-cicpay3v?file=src%2FApp.tsx

There are two problems of this example:

  • Returned object value from createQuery should not be destructured
  • Use <Show fallback={<p>loading..</p>}> or <Switch> <Match> , instead of early returning

mattp0123 avatar Mar 28 '25 07:03 mattp0123