Skip to content

refactor: better data fetching #100

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

Merged
merged 1 commit into from
May 2, 2025
Merged

Conversation

Zareix
Copy link
Contributor

@Zareix Zareix commented Apr 25, 2025

Use a custom hook to fetch data, to better handle loading state and add an error screen.
CleanShot 2025-04-25 at 23 28 35@2x

It’s not perfect since we need to do it our self, but we could enhance it even more by using something like react-query although this seems overkill for a single fetch

@Zareix Zareix force-pushed the better-data-fetch branch from c087623 to b5cd3f1 Compare April 25, 2025 21:30
@Zareix Zareix force-pushed the better-data-fetch branch from b5cd3f1 to 9e1df97 Compare April 25, 2025 21:31
@sergi0g
Copy link
Owner

sergi0g commented Apr 26, 2025

Hey @Zareix!

Thank you so much for this contribution! I've been wanting to do this, but I was always too bored! 😄
I really like the way you implemented this and you're right, for now React Query is indeed overkill.

I'll test this and merge as soon as I can. Thanks again!

Copy link
Owner

@sergi0g sergi0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you so much!

@sergi0g sergi0g merged commit 5ea924c into sergi0g:main May 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants