BGD. Aave IPFS UI. Improving state management

Reading time saved: 3 minutes

0 replies, 1637 views, 5 likes


Bgdlabs has contributed to improving the Aave IPFS UI's state management system, aiming to enhance performance and maintainability. After evaluating various React state management solutions, Flux with Zustand was chosen and progressively implemented, with plans for further migration and community collaboration for design and migration ideas.

The discussion primarily revolves around the contributions made by Bgdlabs to enhance the state management system of the Aave IPFS UI. The goal is to improve the performance and maintainability of the front-end application, which currently faces challenges in separating visual components from business logic, splitting business logic into multiple files, and composing multiple actions together without triggering unnecessary React state changes and re-renders.

After researching modern React state management solutions, Bgdlabs identified three potential approaches: Atomic state, Proxy pattern, and Flux. The Atomic state was dismissed due to its lack of global actions flow, and the Proxy approach was deemed too complex. Flux with Zustand was chosen as the most suitable solution for Aave, given its simplicity, fully typed API, and dedicated place for business logic outside the component scope.

Bgdlabs has already submitted a PR to move most of the Aave business logic related to pool, governance, and staking to zustand, while maintaining the same interfaces for the rest of the app. This is a progressive improvement, and they plan to continue submitting PRs to migrate the remaining parts of the Aave interface to zustand in small chunks. They also plan to use the same architecture for any other Aave project and have created an example for inspiration. The community is invited to provide feedback and contribute ideas on how to design and migrate the remaining parts of the app, like the transaction manager or wallet connection. The collaboration with Aave Companies, the maintainer of the Aave IPFS UI codebase, was also acknowledged and appreciated.

Posted a year ago

Last reply a year ago

Summary updated 2 months ago

Last updated 08/12 04:39