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

fix: Infinite loading when errors retrieving data #214

Merged
merged 8 commits into from
Aug 6, 2021

Conversation

Zoramite
Copy link
Member

@Zoramite Zoramite commented Aug 6, 2021

When data is being retrieved from the api it handles the error and displays a notification, but the next render tries to reload the same api call since the value is still undefined.

This change gives a null value for data in the state for the values that are loaded without arguments and adds helper functions that trigger the api calls if the value is undefined but not if it is null. This makes it simpler for the UI to use the state without having to know and handle the null state and still allow for lazy loading of the data.

fixes #128

@Zoramite Zoramite added the bug Something isn't working label Aug 6, 2021
@Zoramite Zoramite self-assigned this Aug 6, 2021
@Zoramite Zoramite merged commit 527de65 into main Aug 6, 2021
@Zoramite Zoramite deleted the fix/infinite-reload branch August 6, 2021 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Infinite loop when unable to load project
1 participant