A simple test project that recreates Zustand–style state management for SwiftUI, powered by Boutique.
This repository demonstrates how to build a lightweight, composable state store in SwiftUI—similar in spirit to JavaScript’s Zustand library. It uses Boutique under the hood to provide:
- Global, shared state that SwiftUI views can read from and write to.
- Simple API: subscribe to slices of state, update via closures.
- No boilerplate: no generated code, no macros, just plain Swift.
⚠️ Note: This is purely an experimental “proof of concept” and not production-ready. Use at your own risk!
- 🔄 Reactive bindings: SwiftUI views automatically refresh when the slice of state they depend on changes.
- đź§© Composable stores: Combine multiple state slices into one centralized store.
- 🚀 Minimal API: Inspired by Zustand’s API style.
- đź”— Boutique-powered: Leverages the Boutique package for state container management.
- Xcode 14.0 or later
- iOS 15.0+, macOS 12.0+
- Swift 5.7+
- Clone the repo
git clone https://github.com/your-username/Zustand-SwiftUI.git cd Zustand-SwiftUI