We're adding three things to SolScan:
By the end, your SolScan app will feel like a real app people would actually use.
Right now in our SolScan app:
Problem 1: Data doesn't survive restarts. Search for a wallet, close the app, open it — gone. Users hate this.
Problem 2: Screens can't share data. If you favorite a wallet on the Explorer tab, the Settings tab has no idea. You'd have to pass props through every layout, which gets ugly fast.
Problem 3: No offline capability. If the user loses internet, the app shows nothing. A real app should show the last known data.
Solution: Zustand for global state + MMKV for persistence. These two together give you an offline-first app where data flows everywhere and survives restarts.
Zustand (German for "state") is a tiny state management library. Think of it as React Context but without the boilerplate and re-render problems.
Why not Context? Context re-renders every component that uses it when ANY value changes. Zustand only re-renders components that use the specific value that changed. In a list of 100 items, this is the difference between smooth and janky.
Why not Redux? Redux is powerful but requires actions, reducers, dispatchers, middleware, and a lot of boilerplate. Zustand does the same thing in 10 lines.