smushball
smushball
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Makes sense
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
I think that depends on how Solid createResource works? Does it cancel the running promise when calling refetch ?
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Would be nice if Solid had a resource.promise() which resolved into the resource, but this function works well 😄
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Yup. I was just refactoring into the same ish thing
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Yup, that seems to do it
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Would be awesome if it were possible 😄
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
I would rather have an await resource() function, but sending the data from a Show callback is fine. It's more of a TypeScript issue
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Ty
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Aight
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
You would then pass data to the handleSubmit function?
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
I need to use from data from my resource inside a submit callback. Specifically, it's like an "Add to cart" function, which needs to check some logic based on your cart, and a resource which fetches from some external API
38 replies
SSolidJS
Created by smushball on 5/22/2024 in #support
Await a resource inside a function?
Unsure how to use the startTranstition in this case.
38 replies