Is it possible to get createAsync to revaluate/ refetch data like createResource?
GitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
7 Replies
If you have a
cache
function, and use it inside a createAsync, then should be able to do a cache revalidate, and my understanding is that it will trigger an update of the createAsyncGitHub
GitHub - solidjs/solid-router: A universal router for Solid inspire...
A universal router for Solid inspired by Ember and React Router - solidjs/solid-router
I read that but don't understand how or what trigger the revalidate? Would you be able to give me an example?
Yes, so you can import {revalidate} from the
@solidjs/router
ah it's an actual function got it! Thank you
When you've tried, let me know if it works for you
I ended up not needing to refetch because I could use the data in the ui to get the value I needed. (I was added data to a list and was thinking of using refetch/ revalidate to get the new number of items in the list but its faster just to add the new item to the existing length of list to get the total
@Birk Skyum Thank you for you're help!