You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+7-4Lines changed: 7 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# swift-url-routing
2
2
3
-
A bidirectional router with more type safety and less fuss. This library is built with [Parsing][swift-parsing].
3
+
A bidirectional URL router with more type safety and less fuss. This library is built with [Parsing][swift-parsing].
4
4
5
5
---
6
6
@@ -30,7 +30,7 @@ This library provides URL routing function for both client and server applicatio
30
30
31
31
To use the library you first begin with a domain modeling exercise. You model a route enum that represents each URL you want to recognize in your application, and each case of the enum holds the data you want to extract from the URL.
32
32
33
-
For example, if we had screens in our application that represent showing all books, showing a particular book, and searching books, we can model this as an enum:
33
+
For example, if we had screens in our Books application that represent showing all books, showing a particular book, and searching books, we can model this as an enum:
34
34
35
35
```swift
36
36
enumAppRoute {
@@ -69,7 +69,7 @@ let appRouter = OneOf {
69
69
}
70
70
```
71
71
72
-
This router describes at a high-level how to pick apart the path components, query parameters, and more from a URL in order to transform it into a`AppRoute`.
72
+
This router describes at a high-level how to pick apart the path components, query parameters, and more from a URL in order to transform it into an`AppRoute`.
73
73
74
74
Once this router is defined you can use it to implement deep-linking logic in your application. You can implement a single function that accepts a `URL`, use the router's `match` method to transform it into an `AppRoute`, and then switch on the route to handle each deep link destination:
75
75
@@ -92,7 +92,7 @@ This kind of routing is incredibly useful in client side iOS applications, but i
0 commit comments