Make a Resource depend on another Resource
I would like to have a resource depend (awaiting) on another, like so:
However I don't have access to the promise in the return of the resource:
https://docs.solidjs.com/references/api-reference/basic-reactivity/createResource
See
ResourceReturn
doesn't expose the promise/fetcher.5 Replies
This seems to work:
But not sure if it's the best way, for example:
1. what if we have multiple resources to wait for
2. I don't necessarily want to retrigger the fetcher when the source changes
you can check the state of source resources inside the fetcher
Yes but I can't await for the state, right? So if I have an if-statement on the state, I might just skip the request at all
pardon me for late reply https://playground.solidjs.com/anonymous/bc9a3296-1662-4938-9134-13f3e6e6b9dc
Hey thank you for helping<3