• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

openSUSE / agama / 9839659175 / 3 – service
72%
master: 72%

Build:
DEFAULT BRANCH: master
Ran 08 Jul 2024 12:37PM UTC
Files 366
Run time 7s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Jul 2024 12:33PM UTC coverage: 87.039%. First build
service – 9839659175.3

push

github

web-flow
refactor(web): adopt TanStack Query for state management (#1439)

Trello:
https://trello.com/c/8u1WOJz4/3723-8-agama-ui-adopt-a-state-management-solution

Agama's UI state management could be better. For that reason, and after
evaluating a few alternatives (see the list of considered alternatives),
we decided to adopt [Tanstack Query (former React
Query)](https://tanstack.com/query/v5).

## Why TanStack query

* It offers a mechanism (based on promises) to fetch/update the state.
* It is not limited to the client state: it works great with the server
state, too.
* It takes care of caching, re-fetching, error handling, etc.
* It is a mature, well-documented and widely known project.
* Plays nicely with [React Router](https://reactrouter.com/), although a
[TanStack Router](https://tanstack.com/router/latest) project exits.

## What is included in this PR

There is quite some work to do so let's consider this pull request as
the first step in this path. It introduces the following changes:

- Add TanStack query as a dependency.
- Replace `L10Provider` with a queries-based approach, including data
mutation. Check
[queries/l10n.js](https://github.com/openSUSE/agama/blob/react-query/web/src/queries/l10n.js)
if you are curious.
- Re-enable L10nPage tests (and add other tests).
- Use React Router loaders to make sure data is loaded before the
components are rendered.

## Considered Alternatives

- [Redux](https://react-redux.js.org/)
- [Jotai](https://jotai.org/)
- [Zustand](https://docs.pmnd.rs/zustand/getting-started/introduction)
- [Tanstack Query (former React Query)](https://tanstack.com/query/v5)
- [Recoil](https://recoiljs.org/)

We had a look at others but did not consider them at all.

11336 of 13024 relevant lines covered (87.04%)

24.88 hits per line

Source Files on job service - 9839659175.3
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 9839659175
  • 05e79638 on github
  • Prev Job for on master (#9794493654.)
  • Next Job for on master (#9853207056.)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc