Skip to content
This repository has been archived by the owner on Jan 1, 2025. It is now read-only.

RecoilLoadable contains Promise value will never change state from 'loading' to other states. #2290

Open
iahu opened this issue Oct 16, 2023 · 0 comments

Comments

@iahu
Copy link

iahu commented Oct 16, 2023

I want to create a Loadable State from a list of remote data, which like that:

const loadableState = RecoilLoadable.all([1,2,3].map(n => getDataById(n)));

and use it to render a DOM list.

I hope the loadableState will change state to hasError or hasValue when all requests have resolved. but unexpected that the state never changed.

here is a running example of my issue.

I'm not sure of that is by design or a bug, but just report it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant