You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently useAsset suspends by itself. While this is fine for most cases, but there are cases where you want more control. My proposal is that useAsset instead return a Thenable which consumers unwrap with use().
In v9 we aren't doing breaking changes, but I think this makes sense if we add a new API like loadAsset and then decide if we want to deprecate useAsset later. There is a complete overhaul of caching planned for v10 that this might lead to nicely.
Currently
useAsset
suspends by itself. While this is fine for most cases, but there are cases where you want more control. My proposal is thatuseAsset
instead return aThenable
which consumers unwrap withuse()
.E.g.
or a one-liner
Note that I we do this,
useAsset
doesn't really need to be a hook any more. So we could even do something likeThe text was updated successfully, but these errors were encountered: