Skip to content

Manage execution events with react-query instead of rest-hooks

Loic Huder requested to merge cache-events into main

Part of the migration from rest-hooks to react-query.

Rather than trying to plug myself in the cache of react-query (which I don't think I can), I rather use a zustand store to store the execution events and update them when a new one comes through the websocket.

Since the zustand store is synced to the react-query fetch in MonitorPage, the periodic refetchs of react-query ensure that our front-end cache will be up to date with the server events.

EDIT: Following !341 (comment 272414) instead

Edited by Loic Huder

Merge request reports

Loading