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

Add solid-query and skeleton for contributors #82

Merged
merged 1 commit into from Sep 1, 2023
Merged

Conversation

Joe2k
Copy link
Contributor

@Joe2k Joe2k commented Aug 31, 2023

Solid query is awesome. Ive used react query in previous projects and its too good. Helps with inbuilt caching as well. And helps to write better code and comes with out of box data, loading and error handling.

So integrating it here to use it further for tournaments where there will be multiple same read calls.

So this will help to cache and reduce hits on our server

@Joe2k Joe2k requested a review from punchagan August 31, 2023 13:09
@Joe2k Joe2k self-assigned this Aug 31, 2023
@punchagan
Copy link
Member

Ooh, I had briefly looked at the Suspense stuff, but didn't know about solid-query. This looks great. I like the data fetching, loading and error handling stuff!

I didn't read up much, but what do you mean by in-built caching? Is it between different page navigations, after the site has been loaded once? Does it also cache between page reloads?

@Joe2k
Copy link
Contributor Author

Joe2k commented Aug 31, 2023

Yep so after we land on our page every fetch call we make is associated to a key.. in this case "collaborators" and it is cached.. So when you go to dashboard and come back to home colloboators are picked from cache and shown and then in backround it refreshes and updates if there is new data.

@Joe2k
Copy link
Contributor Author

Joe2k commented Aug 31, 2023

https://www.bigbinary.com/blog/react-query

check this out..

There is refetch for window focus and all which i used before which will be too good for tournament updates on the go when you dont even need to refresh page

@punchagan
Copy link
Member

There is refetch for window focus and all which i used before which will be too good for tournament updates on the go when you dont even need to refresh page

Nice this is great! You can also set an auto refresh interval. :)

I pushed a tiny change to turn off refreshOnWindowFocus for the contributors query. We can live with a little stale data there. :)

@punchagan punchagan merged commit dbe8930 into main Sep 1, 2023
5 checks passed
@punchagan punchagan deleted the solid-query branch September 1, 2023 10:34
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.

None yet

2 participants