Closed grod220 closed 1 day ago
from my perspective, using Mobx for managing client-side app state seems to be exactly what we're looking for in a HFT DEX UI since it focuses on fine-grained reactivity, keeping the UI reactive with a performant batch update system while intelligently avoiding unnecessary re-renders.
Closes https://github.com/penumbra-zone/dex-explorer/issues/66 Closes https://github.com/penumbra-zone/dex-explorer/issues/67
Takes over from: https://github.com/penumbra-zone/dex-explorer/pull/70
An experiment of using Mobx for the connection + streaming status state. Observations:
Pros
when()
and don't need to enter react context to form store relationships + reactionsCons
observer()
if relying upon observable varsmakeAutoObservable()
, but often have to make explicit setter functions. Adding decorator syntax could help with this.