Brownie

Alpha

Brownie is in alpha stage. APIs may change.

Brownie is a shared state management library for React Native brownfield apps. It enables seamless state synchronization between your React Native code and native code.

Features

  • Shared State - Single source of truth accessible from both TypeScript and Swift
  • Type Safety - Full type inference from TypeScript schema to generated Swift types
  • React Integration - useStore hook with selector support for optimal re-renders
  • SwiftUI Integration - @UseStore property wrapper for reactive UI updates
  • UIKit Support - Subscribe-based API for imperative UI updates

Platform Support

PlatformStatus
iOSSupported
AndroidComing soon

How It Works

┌─────────────────┐       ┌──────────────────┐       ┌─────────────────┐
│   TypeScript    │──────▶│  Brownfield CLI  │──────▶│  Swift types    │
│   Store Schema  │       │     (codegen)    │       │   (generated)   │
└─────────────────┘       └──────────────────┘       └─────────────────┘
  1. Define your store shape in a *.brownie.ts file using TypeScript
  2. Run brownfield codegen to generate native types
  3. Use useStore in React Native and @UseStore in Swift
  4. State changes sync automatically between both sides

Next Steps

Need React or React Native expertise you can count on?