unihooks icon indicating copy to clipboard operation
unihooks copied to clipboard

useResource

Open dy opened this issue 5 years ago • 0 comments

Can be useful to indicate loading state. That is incurred by gotcha from wishbox - we need to initialize cart with experiences, after the experiences are loaded. For that matter we could wait for experiences condition in reactive aspect, and once they're loaded - that'd trigger initialization.

let [data, {loading}] = useResource(someSource)

That can be akin to useAsyncSource

dy avatar Jan 11 '20 10:01 dy