Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MalekKamel committed Nov 22, 2022
1 parent 12020b6 commit db3ee45
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,29 +205,30 @@ NavView {
3. Navigate to your destination view:

- Using `NavLink`.

```swift
NavLink(destination: SomeView()) {
// When this view is clicked, it will trigger
// the navigation and show the destination view
ProductItemView()
// Declare navigator
@EnvironmentObject private var navigator: Navigator

// Navigate
navigator.navigate {
SomeView()
}
```

> For more details about`Navigator`, see [NavLink](#navlink)
> For more details about`Navigator`, see [Navigator](#navigator)
- Or using `Navigator`

```swift
@EnvironmentObject private var navigator: Navigator
- Using `NavLink`.

navigator.navigate {
SomeView()
```swift
NavLink(destination: SomeView()) {
// When this view is clicked, it will trigger
// the navigation and show ProductItemView
ProductItemView()
}
```

> For more details about`Navigator`, see [Navigator](#navigator)
> For more details about`Navigator`, see [NavLink](#navlink)
4. Dismiss (navigate back) to the previous view
**_programmatically_** (using `Navigator`) or using a **_link_** (using `DismissLink`).
Expand Down

0 comments on commit db3ee45

Please sign in to comment.