Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
mchudy committed Sep 15, 2020
1 parent 7f2f084 commit 898a208
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ routes.items.item.pattern // `/items/:itemId(${uuidRegex})`
### Routing
To use stronly typed paths, you first have to create the routing object by calling `createRouting` and providing an
To use strongly typed paths, you first have to create the routing object by calling `createRouting` and providing an
object defining segments. Segments represent single routing paths and are implemented as tagged template literals:
```js
Expand Down Expand Up @@ -129,13 +129,15 @@ routes.products.pattern
```
Those patterns are useful for integration with routing libraries which support
[path-to-regexp](https://github.com/pillarjs/path-to-regexp)-style syntax e.g. in case of React Router DOM:
[path-to-regexp](https://github.com/pillarjs/path-to-regexp)-style syntax.
#### React Router DOM
```jsx
<Route exact component={ProductsPage} path={routes.products.pattern} />
```
and in case of Vue Router:
#### Vue Router
```js
const router = new VueRouter({
Expand Down

0 comments on commit 898a208

Please sign in to comment.