Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for promises in nested states (HOOKSTATE-105) #237

Closed
ryanwillis opened this issue Oct 1, 2021 · 4 comments
Closed

Support for promises in nested states (HOOKSTATE-105) #237

ryanwillis opened this issue Oct 1, 2021 · 4 comments
Labels
question Further information is requested

Comments

@ryanwillis
Copy link
Contributor

ryanwillis commented Oct 1, 2021

Hi there! Any plans to support promises in nested states?

I have been using a global, persisted state for everything except a single value due to the fact that it must be loaded asynchronously a single time on load. It would be nice if I could throw a promise into the nested value. Thanks!

@avkonst
Copy link
Owner

avkonst commented Oct 1, 2021

There were problems with making promises possible in nested fields.
The one option for you would be to use multiple independent global persisted stores and one reference list store, which would refer to the global persisted stores. This way the reference list or dictionary store would be always available and the referred states could allow multiple independent promised states. I used this approach in the past. Would it work for you?

@avkonst avkonst added the question Further information is requested label Oct 1, 2021
@avkonst
Copy link
Owner

avkonst commented Jan 11, 2022

Please reopen if the answer is unclear

@avkonst avkonst closed this as completed Jan 11, 2022
@Arutyun2312
Copy link

Hey, could you provide an example for this?

@avkonst
Copy link
Owner

avkonst commented Jul 30, 2022

There is a task for this #299 to be completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants