[PR #6757] Retrofit useTransactions to use react-query under the hood #6719

Closed
opened 2026-02-28 21:31:50 -06:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/actualbudget/actual/pull/6757

State: closed
Merged: Yes


Results in easier to maintain code with much faster load times and reuses the cached transactions the next time the transaction list is accessed (does not refetch from database).


Bundle Stats

Bundle Files count Total bundle size % Changed
desktop-client 27 14.64 MB → 14.64 MB (+5.67 kB) +0.04%
loot-core 1 5.86 MB 0%
api 1 4.39 MB 0%
View detailed bundle stats

desktop-client

Total

Files count Total bundle size % Changed
27 14.64 MB → 14.64 MB (+5.67 kB) +0.04%
Changeset
File Δ Size
node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js 🆕 +1.97 kB 0 B → 1.97 kB
src/transactions/queries.ts 🆕 +711 B 0 B → 711 B
node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js 🆕 +115 B 0 B → 115 B
node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js 🆕 +91 B 0 B → 91 B
src/redux/store.ts 📈 +321 B (+32.66%) 983 B → 1.27 kB
node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js 📈 +180 B (+25.75%) 699 B → 879 B
node_modules/@tanstack/query-core/build/modern/mutationObserver.js 📈 +404 B (+11.89%) 3.32 kB → 3.71 kB
node_modules/@tanstack/query-core/build/modern/utils.js 📈 +607 B (+10.36%) 5.72 kB → 6.31 kB
src/components/mobile/budget/UncategorizedTransactions.tsx 📈 +163 B (+5.03%) 3.16 kB → 3.32 kB
node_modules/@tanstack/query-core/build/modern/mutation.js 📈 +246 B (+3.73%) 6.44 kB → 6.68 kB
src/hooks/useTransactions.ts 📈 +145 B (+3.19%) 4.44 kB → 4.58 kB
src/index.tsx 📈 +35 B (+2.05%) 1.67 kB → 1.71 kB
node_modules/@tanstack/query-core/build/modern/query.js 📈 +201 B (+1.73%) 11.35 kB → 11.54 kB
src/components/mobile/budget/CategoryTransactions.tsx 📈 +93 B (+1.59%) 5.72 kB → 5.81 kB
src/components/mobile/accounts/AllAccountTransactions.tsx 📈 +93 B (+1.55%) 5.84 kB → 5.93 kB
src/components/mobile/accounts/OnBudgetAccountTransactions.tsx 📈 +93 B (+1.43%) 6.36 kB → 6.45 kB
src/components/mobile/accounts/OffBudgetAccountTransactions.tsx 📈 +93 B (+1.43%) 6.37 kB → 6.46 kB
src/components/mobile/accounts/AccountTransactions.tsx 📈 +93 B (+0.94%) 9.7 kB → 9.79 kB
node_modules/@tanstack/query-core/build/modern/queryObserver.js 📈 +93 B (+0.59%) 15.52 kB → 15.61 kB
src/components/mobile/budget/BudgetPage.tsx 📈 +34 B (+0.08%) 39.56 kB → 39.59 kB
src/components/reports/reports/Calendar.tsx 📈 +5 B (+0.02%) 28.98 kB → 28.99 kB
src/hooks/useDisplayPayee.tsx 📉 -1 B (-0.02%) 4.97 kB → 4.97 kB
node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs 📉 -6 B (-0.03%) 20.07 kB → 20.06 kB
node_modules/@tanstack/react-query/build/modern/useBaseQuery.js 📉 -26 B (-0.99%) 2.56 kB → 2.53 kB
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger

Asset File Size % Changed
static/js/wide.js 160.07 kB → 163.86 kB (+3.79 kB) +2.37%
static/js/index.js 9.48 MB → 9.48 MB (+1.22 kB) +0.01%
static/js/narrow.js 640.46 kB → 641.1 kB (+662 B) +0.10%
static/js/ReportRouter.js 1.12 MB → 1.12 MB (+5 B) +0.00%

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
static/js/indexeddb-main-thread-worker-e59fee74.js 12.94 kB 0%
static/js/workbox-window.prod.es5.js 5.64 kB 0%
static/js/da.js 106.62 kB 0%
static/js/de.js 180.44 kB 0%
static/js/en-GB.js 7.18 kB 0%
static/js/en.js 164.55 kB 0%
static/js/es.js 173.83 kB 0%
static/js/fr.js 179.62 kB 0%
static/js/it.js 171.44 kB 0%
static/js/nb-NO.js 157.23 kB 0%
static/js/nl.js 106.65 kB 0%
static/js/pl.js 88.64 kB 0%
static/js/pt-BR.js 154.57 kB 0%
static/js/sv.js 78.2 kB 0%
static/js/th.js 182.35 kB 0%
static/js/uk.js 215.11 kB 0%
static/js/resize-observer.js 18.37 kB 0%
static/js/BackgroundImage.js 120.54 kB 0%
static/js/TransactionList.js 105.97 kB 0%
static/js/AppliedFilters.js 9.71 kB 0%
static/js/usePayeeRuleCounts.js 10.05 kB 0%
static/js/useTransactionBatchActions.js 13.23 kB 0%
static/js/FormulaEditor.js 1.04 MB 0%

loot-core

Total

Files count Total bundle size % Changed
1 5.86 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
kcab.worker.CD8O_YQc.js 5.86 MB 0%

api

Total

Files count Total bundle size % Changed
1 4.39 MB 0%
View detailed bundle breakdown

Added
No assets were added

Removed
No assets were removed

Bigger
No assets were bigger

Smaller
No assets were smaller

Unchanged

Asset File Size % Changed
bundle.api.js 4.39 MB 0%
**Original Pull Request:** https://github.com/actualbudget/actual/pull/6757 **State:** closed **Merged:** Yes --- <!-- Thank you for submitting a pull request! Make sure to follow the instructions to write release notes for your PR — it should only take a minute or two: https://github.com/actualbudget/docs#writing-good-release-notes. Try running yarn generate:release-notes *before* pushing your PR for an interactive experience. --> Results in easier to maintain code with much faster load times and reuses the cached transactions the next time the transaction list is accessed (does not refetch from database). <!--- actual-bot-sections ---> <hr /> <!--- bundlestats-action-comment key:combined start ---> ### Bundle Stats Bundle | Files count | Total bundle size | % Changed ------ | ----------- | ----------------- | --------- desktop-client | 27 | 14.64 MB → 14.64 MB (+5.67 kB) | +0.04% loot-core | 1 | 5.86 MB | 0% api | 1 | 4.39 MB | 0% <details> <summary>View detailed bundle stats</summary> #### desktop-client **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 27 | 14.64 MB → 14.64 MB (+5.67 kB) | +0.04% <details> <summary>Changeset</summary> File | Δ | Size ---- | - | ---- `node_modules/@tanstack/query-core/build/modern/infiniteQueryObserver.js` | 🆕 +1.97 kB | 0 B → 1.97 kB `src/transactions/queries.ts` | 🆕 +711 B | 0 B → 711 B `node_modules/@tanstack/react-query/build/modern/useInfiniteQuery.js` | 🆕 +115 B | 0 B → 115 B `node_modules/@tanstack/react-query/build/modern/infiniteQueryOptions.js` | 🆕 +91 B | 0 B → 91 B `src/redux/store.ts` | 📈 +321 B (+32.66%) | 983 B → 1.27 kB `node_modules/@tanstack/react-query/build/modern/errorBoundaryUtils.js` | 📈 +180 B (+25.75%) | 699 B → 879 B `node_modules/@tanstack/query-core/build/modern/mutationObserver.js` | 📈 +404 B (+11.89%) | 3.32 kB → 3.71 kB `node_modules/@tanstack/query-core/build/modern/utils.js` | 📈 +607 B (+10.36%) | 5.72 kB → 6.31 kB `src/components/mobile/budget/UncategorizedTransactions.tsx` | 📈 +163 B (+5.03%) | 3.16 kB → 3.32 kB `node_modules/@tanstack/query-core/build/modern/mutation.js` | 📈 +246 B (+3.73%) | 6.44 kB → 6.68 kB `src/hooks/useTransactions.ts` | 📈 +145 B (+3.19%) | 4.44 kB → 4.58 kB `src/index.tsx` | 📈 +35 B (+2.05%) | 1.67 kB → 1.71 kB `node_modules/@tanstack/query-core/build/modern/query.js` | 📈 +201 B (+1.73%) | 11.35 kB → 11.54 kB `src/components/mobile/budget/CategoryTransactions.tsx` | 📈 +93 B (+1.59%) | 5.72 kB → 5.81 kB `src/components/mobile/accounts/AllAccountTransactions.tsx` | 📈 +93 B (+1.55%) | 5.84 kB → 5.93 kB `src/components/mobile/accounts/OnBudgetAccountTransactions.tsx` | 📈 +93 B (+1.43%) | 6.36 kB → 6.45 kB `src/components/mobile/accounts/OffBudgetAccountTransactions.tsx` | 📈 +93 B (+1.43%) | 6.37 kB → 6.46 kB `src/components/mobile/accounts/AccountTransactions.tsx` | 📈 +93 B (+0.94%) | 9.7 kB → 9.79 kB `node_modules/@tanstack/query-core/build/modern/queryObserver.js` | 📈 +93 B (+0.59%) | 15.52 kB → 15.61 kB `src/components/mobile/budget/BudgetPage.tsx` | 📈 +34 B (+0.08%) | 39.56 kB → 39.59 kB `src/components/reports/reports/Calendar.tsx` | 📈 +5 B (+0.02%) | 28.98 kB → 28.99 kB `src/hooks/useDisplayPayee.tsx` | 📉 -1 B (-0.02%) | 4.97 kB → 4.97 kB `node_modules/@react-spring/shared/dist/react-spring_shared.modern.mjs` | 📉 -6 B (-0.03%) | 20.07 kB → 20.06 kB `node_modules/@tanstack/react-query/build/modern/useBaseQuery.js` | 📉 -26 B (-0.99%) | 2.56 kB → 2.53 kB </details> <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** Asset | File Size | % Changed ----- | --------- | --------- static/js/wide.js | 160.07 kB → 163.86 kB (+3.79 kB) | +2.37% static/js/index.js | 9.48 MB → 9.48 MB (+1.22 kB) | +0.01% static/js/narrow.js | 640.46 kB → 641.1 kB (+662 B) | +0.10% static/js/ReportRouter.js | 1.12 MB → 1.12 MB (+5 B) | +0.00% **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- static/js/indexeddb-main-thread-worker-e59fee74.js | 12.94 kB | 0% static/js/workbox-window.prod.es5.js | 5.64 kB | 0% static/js/da.js | 106.62 kB | 0% static/js/de.js | 180.44 kB | 0% static/js/en-GB.js | 7.18 kB | 0% static/js/en.js | 164.55 kB | 0% static/js/es.js | 173.83 kB | 0% static/js/fr.js | 179.62 kB | 0% static/js/it.js | 171.44 kB | 0% static/js/nb-NO.js | 157.23 kB | 0% static/js/nl.js | 106.65 kB | 0% static/js/pl.js | 88.64 kB | 0% static/js/pt-BR.js | 154.57 kB | 0% static/js/sv.js | 78.2 kB | 0% static/js/th.js | 182.35 kB | 0% static/js/uk.js | 215.11 kB | 0% static/js/resize-observer.js | 18.37 kB | 0% static/js/BackgroundImage.js | 120.54 kB | 0% static/js/TransactionList.js | 105.97 kB | 0% static/js/AppliedFilters.js | 9.71 kB | 0% static/js/usePayeeRuleCounts.js | 10.05 kB | 0% static/js/useTransactionBatchActions.js | 13.23 kB | 0% static/js/FormulaEditor.js | 1.04 MB | 0% </div> </details> --- #### loot-core **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 5.86 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- kcab.worker.CD8O_YQc.js | 5.86 MB | 0% </div> </details> --- #### api **Total** Files count | Total bundle size | % Changed ----------- | ----------------- | --------- 1 | 4.39 MB | 0% <details> <summary>View detailed bundle breakdown</summary> <div> **Added** No assets were added **Removed** No assets were removed **Bigger** No assets were bigger **Smaller** No assets were smaller **Unchanged** Asset | File Size | % Changed ----- | --------- | --------- bundle.api.js | 4.39 MB | 0% </div> </details> </details> <!--- bundlestats-action-comment key:combined end --->
GiteaMirror added the pull-request label 2026-02-28 21:31:50 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#6719