Skip to content

Commit

Permalink
Merge pull request #36 from tordans/patch-2
Browse files Browse the repository at this point in the history
Docs: Improve search query routing part on search params
  • Loading branch information
ai authored May 19, 2024
2 parents 80a333d + f26cc8f commit c6e9f1d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ createRouter({

### Search Query Routing

Router value contains parsed `?a=1&b=2` search values:
Router value contains parsed url search params:

```js
createRouter({ home: '/posts/:category' })

location.href = '/posts/general?sort=name'
router.get() //=> {
// path: '/posts/category',
// path: '/posts/general',
// route: 'list',
// params: { category: 'general' },
// search: { sort: 'name' }
Expand Down

0 comments on commit c6e9f1d

Please sign in to comment.