Given that we're using wagmi v2, and we don't have too much state presently. I propose we reduce the state management to the lowest complexity for the first iteration.
The tanstack features afforded by wagmi v2 allow for very granular control over the behaviours of queries.
The intention of this refactor is to not pre-optimize, but also to document, explicitly, the overall state, externalizes & dependencies. This will be essential to making an efficient & effective move to a state manager like zustand and in general provide more explicit procedure to dapp creation.
The objective of this task is not to completely and perfectly map out the app, but as a start of process of identifying and documenting the state of the app. This should be a foundational document for considering future development.
[ ] Liveliness of data (When do we fetch data and how often is it updated)
[ ] UI State (Dark mode, Region locked, Resolutions, Modals)
Actions:
[ ] Document all the read or fetch actions, ordered depending on if the Dapp calls it automatically or if triggered by the user or by external factors (Chain updates for example)
[ ] Any prerequisites or dependencies for a given action
[ ] Any mutations for a given action
[ ] Document all the write actions (Transactions basically)
[ ] Any prerequisites or dependencies for a given action
Overview
Given that we're using
wagmi
v2, and we don't have too much state presently. I propose we reduce the state management to the lowest complexity for the first iteration.The
tanstack
features afforded bywagmi
v2 allow for very granular control over the behaviours of queries.The intention of this refactor is to not pre-optimize, but also to document, explicitly, the overall state, externalizes & dependencies. This will be essential to making an efficient & effective move to a state manager like
zustand
and in general provide more explicit procedure to dapp creation.The objective of this task is not to completely and perfectly map out the app, but as a start of process of identifying and documenting the state of the app. This should be a foundational document for considering future development.
Core Tasks
Outline current state:
Actions: