pancake-frontend
pancake-frontend copied to clipboard
perf: Use query instead of queries to reduce rerenders initially
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
withuseQuery
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}