Skip to content

Commit

Permalink
Closes #1 Add a note about supported syntax.
Browse files Browse the repository at this point in the history
  • Loading branch information
molefrog committed Apr 16, 2019
1 parent f063973 commit bb0a25a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ used by React Router or Express, and it supports the following patterns:
- Named dynamic segments: `/users/:foo`.
- Dynamic segments with modifiers: `/foo/:bar*`, `/foo/baz?` or `/foo/bar+`.

The library was designed to be as small as possible, so most of the additional matching feature were left out.
The library was designed to be as small as possible, so most of the additional matching feature were left out
(see [this issue](https://github.com/molefrog/wouter/issues/1) for more info).
If you do need to have `path-to-regexp`-like functionality you can customize a matcher function:

```js
Expand All @@ -85,7 +86,6 @@ import pathToRegexp from "path-to-regexp";

const App = () => (
<Router matcher={createMatcher(pathToRegexp)}>

{/* segment constraints aren't supported by wouter */}
<Route path="/users/:id(\d+)" />}
</Router>
Expand Down

0 comments on commit bb0a25a

Please sign in to comment.