Closed FezVrasta closed 1 year ago
Hi, first of all thanks for this library, it's great.
I'm working with React Native and I would need a loading boolean to make ScrollView RefreshControl work.
ScrollView
RefreshControl
I tried the useTransition hook but it doesn't seem to do what I need.
useTransition
const [refreshing, startTransition] = useTransition(); const refresh = useCallback(() => { resourceCache(stuffLoader).clear(); startTransition(() => { getStuff(); }); }, []);
I don't think I can get away with suspense in this case, is there any escape hatch to get a simple boolean?
nm! it actually works, but I was passing the wrong argument to resourceCache, that should be the async function itself, the one passed to useAsyncResource.
resourceCache
Hi, first of all thanks for this library, it's great.
I'm working with React Native and I would need a loading boolean to make
ScrollView
RefreshControl
work.I tried the
useTransition
hook but it doesn't seem to do what I need.I don't think I can get away with suspense in this case, is there any escape hatch to get a simple boolean?