Skip to content

Commit

Permalink
Update docs for savedStateHandle
Browse files Browse the repository at this point in the history
  • Loading branch information
easternkite committed Feb 7, 2025
1 parent 5a295b9 commit 8dc3925
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/deploy_web.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: deploy web
on:
push:
tags:
- '[0-9]+\.[0-9]+\.[0-9]+'
branches: [main]
permissions:
contents: write
jobs:
Expand Down
10 changes: 5 additions & 5 deletions docs/navigation/saved-state-handle-integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ val handle = backStack.last().savedStateHandle
val viewModel = viewModel { ViewModel(handle) }
```

**Explanation:**
* `rememberEunGabiController()`: Retrieves the current `EunGabiController` instance.
* `controller.backStack.collectAsState()`: Collects the current state of the back stack as a `State` object.
* `backStack.last().savedStateHandle`: Accesses the `SavedStateHandle` of the most recent entry in the back stack.
* `viewModel { ViewModel(handle) }`: Creates a ViewModel instance with the SavedStateHandle.
**Explanation:**
* `rememberEunGabiController()`: Retrieves the current `EunGabiController` instance.
* `controller.backStack.collectAsState()`: Collects the current state of the back stack as a `State` object.
* `backStack.last().savedStateHandle`: Accesses the `SavedStateHandle` of the most recent entry in the back stack.
* `viewModel { ViewModel(handle) }`: Creates a ViewModel instance with the SavedStateHandle.



Expand Down

0 comments on commit 8dc3925

Please sign in to comment.