pancake-frontend icon indicating copy to clipboard operation
pancake-frontend copied to clipboard

perf: Use query instead of queries to reduce rerenders initially

Open memoyil opened this issue 3 months ago • 2 comments


PR-Codex overview

This PR focuses on refactoring multiple hooks in the codebase to replace useQueries with useQuery, simplifying the data fetching logic and improving error handling across various components.

Detailed summary

  • Replaced useQueries with useQuery in several hooks.
  • Streamlined query functions to use Promise.all for concurrent fetching.
  • Enhanced error handling with console.error in query functions.
  • Updated query keys to utilize join for better string formatting.
  • Simplified memoization of results using useMemo.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

memoyil avatar Oct 31 '24 13:10 memoyil