While I was working on #75 I needed a way to recursively get the parents of a resource.
I tried to create a new hook backed by recursive calls to getResourceAsync.
I noticed that getResourceAsync in store.ts suffers from a race condition happening when resource x is called by getResourceLoading(x) and, while it's still loading, you call getResourceAsync(x) it will return a unready resource.
I suppose this is not the intended behaviour.
While I was working on #75 I needed a way to recursively get the parents of a resource. I tried to create a new hook backed by recursive calls to
getResourceAsync
.I noticed that
getResourceAsync
instore.ts
suffers from a race condition happening when resourcex
is called bygetResourceLoading(x)
and, while it's still loading, you callgetResourceAsync(x)
it will return a unready resource. I suppose this is not the intended behaviour.Opening a pull request with the fix