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

Refactor data loading #54

Open
seanvelasco opened this issue May 30, 2024 · 0 comments
Open

Refactor data loading #54

seanvelasco opened this issue May 30, 2024 · 0 comments

Comments

@seanvelasco
Copy link
Owner

I realized I did not properly implement the new proper data loading paradigm

Currently, I have 3 functions to:

  • query the remote API
  • a function that wraps the above function with cache()
  • a createAsync function that wraps the cache()-ed remote API call

When I could simplify them into two:

  • a function that queries the remote API that's wrapped in cache()
  • the above function can be used for the load arg in the router, as well as in createAsync inside components
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

No branches or pull requests

1 participant