Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Platforms](https://img.shields.io/badge/Platforms-iOS%20|%20macOS%20|%20watchOS%20|%20tvOS-blue.svg)](https://github.com/ViewFeature/Flow)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)

A library for managing state in SwiftUI applications in a type-safe way. Flow provides a unidirectional data flow architecture with full support for Swift 6 Approachable Concurrency.
A type-safe state management library for SwiftUI applications. Flow provides a unidirectional data flow architecture with full support for Swift 6 Approachable Concurrency.

<p align="center">
<img src="flow-diagram.svg" alt="Flow Architecture Diagram" />
Expand Down Expand Up @@ -171,7 +171,7 @@ final class State {
```

- No Combine dependency
- Reduced code
- Less boilerplate code
- Integrates with SwiftUI's standard APIs

### Approachable Concurrency
Expand Down Expand Up @@ -205,11 +205,10 @@ func handle() -> ActionHandler<Action, State, Void> {
- Thread-safety guaranteed
- Native `async/await` support
- Direct state mutations in `.run` blocks
- Caught at compile time, not runtime

### Observable Actions

Flow uses **middleware** to observe actions. This enables implementing cross-cutting concerns like logging, analytics, and debugging.
Flow uses **middleware** to observe actions, enabling cross-cutting concerns like logging, analytics, and debugging.

```swift
struct AnalyticsMiddleware: BeforeActionMiddleware {
Expand All @@ -231,7 +230,7 @@ func handle() -> ActionHandler<Action, State, Void> {
```

- Observe all actions in one place
- Use for logging, analytics, and debugging
- Logging, analytics, and debugging support

## Documentation

Expand Down
4 changes: 2 additions & 2 deletions Sources/Flow/Flow.docc/GettingStarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Add Flow to your `Package.swift`:

```swift
dependencies: [
.package(url: "https://github.com/ViewFeature/Flow.git", from: "0.1.6")
.package(url: "https://github.com/ViewFeature/Flow.git", from: "1.0.0")
]
```

Expand All @@ -41,7 +41,7 @@ dependencies: [

1. Select **File → Add Package Dependencies**
2. Enter the URL: `https://github.com/ViewFeature/Flow.git`
3. Select version: `0.1.6` or later
3. Select version: `1.0.0` or later
4. Add to your target's **Build Settings → Other Swift Flags**: `-default-isolation MainActor`

## Build a Counter App
Expand Down
Loading