Skip to content

Commit

Permalink
Update usage-overview.md
Browse files Browse the repository at this point in the history
  • Loading branch information
0xLeif authored Sep 24, 2024
1 parent 43d7c0f commit 2aedf18
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions documentation/usage-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,6 @@ import SwiftUI
struct SlicingView: View {
@Slice(\.user, \.username) var username: String

<<<<<<< Updated upstream
username = "New Username"
print(username) // Prints "New Username"
```

This example demonstrates how to access and modify a specific slice of application state.

## Next Steps
=======
var body: some View {
VStack {
Text("Username: \(username)")
Expand All @@ -169,7 +160,6 @@ This example demonstrates how to access and modify a specific slice of applicati
This example demonstrates how to access and modify a specific slice of application state within a SwiftUI view.

## Best Practices
>>>>>>> Stashed changes

- **Use `AppState` in SwiftUI Views**: Property wrappers like `@AppState`, `@StoredState`, `@SecureState`, and others are designed to be used within the scope of SwiftUI views.
- **Define State in Application Extension**: Centralize state management by extending `Application` to define your app’s state and dependencies.
Expand Down

0 comments on commit 2aedf18

Please sign in to comment.