You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please provide the ability to use toValue to pass reactive parameters.
Why in solidjs parameters are passed in callback, at the same time Vue, which is also built on the signal system, does not have such a possibility. This requires writing additional abstractions that worsen dx and affect performance.
import{createForm}from'@tanstack/solid-form'import{createQuery}from'@tanstack/solid-query'exportdefaultfunctionApp(){const{ data, isLoading }=createQuery(()=>({queryKey: ['data'],queryFn: async()=>{awaitnewPromise((resolve)=>setTimeout(resolve,1000))return{firstName: 'FirstName',lastName: 'LastName'}},}))constform=createForm(()=>({defaultValues: {firstName: data?.firstName??'',lastName: data?.lastName??'',},onSubmit: async({ value })=>{// Do something with form dataconsole.log(value)},}))if(isLoading)return<p>Loading..</p>returnnull}
The same problem exists in other tanstack libraries
An example of how pinia-colada fixes the shortcomings of vue-query
Please provide the ability to use
toValue
to pass reactive parameters.Why in solidjs parameters are passed in callback, at the same time Vue, which is also built on the signal system, does not have such a possibility. This requires writing additional abstractions that worsen dx and affect performance.
Example
Vue js
SolidJS
The same problem exists in other tanstack libraries
An example of how pinia-colada fixes the shortcomings of vue-query
Discussion about signal api design in Vue
The text was updated successfully, but these errors were encountered: