Replies: 2 comments
-
In addition: add createConditionalResource Spec const [ready, setReady] = createSignal(false);
[profile, {mutate, refetch}] = createConditionalResource(ready(), '/profile', fetcher) |
Beta Was this translation helpful? Give feedback.
0 replies
-
You can do both with the first argument to createResource. Returning undefined from the source defers fetching, so you can just put a conditional in there. Abstracting it into specific primitives is an option and something like solid-primitives could look at that. Simple deferred example: https://codesandbox.io/embed/mystifying-roentgen-2o4wmxj9zy?codemirror=1 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I need conditional or defered resource loading.
Spec
Beta Was this translation helpful? Give feedback.
All reactions