Skip to content

Commit

Permalink
Fix typo: useMatch -> useRouteMatch (#6948)
Browse files Browse the repository at this point in the history
  • Loading branch information
李文富 authored and pshrmn committed Sep 29, 2019
1 parent fbb6358 commit bb9b4fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react-router/docs/api/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ you can just

```jsx
function BlogPost() {
let match = useMatch("/blog/:slug")
let match = useRouteMatch("/blog/:slug")
// Do whatever you want with the match...
}
```
2 changes: 1 addition & 1 deletion packages/react-router/modules/hooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function useRouteMatch(path) {
if (__DEV__) {
invariant(
typeof useContext === "function",
"You must use React >= 16.8 in order to use useMatch()"
"You must use React >= 16.8 in order to use useRouteMatch()"
);
}

Expand Down

0 comments on commit bb9b4fd

Please sign in to comment.