Skip to content

Commit 9cd19e2

Browse files
christophehurpeautimdorr
authored andcommitted
Prompt doc: add example message returns true (#5940)
`true` to allow the transition was not yet shown, do you think it's a useful addition to the documentation ?
1 parent ac1a3cf commit 9cd19e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/react-router/docs/api/Prompt.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Will be called with the next `location` and `action` the user is attempting to n
2525

2626
```jsx
2727
<Prompt message={location => (
28-
`Are you sure you want to go to ${location.pathname}?`
28+
location.pathname.startsWith('/app') ? true : `Are you sure you want to go to ${location.pathname}?`
2929
)}/>
3030
```
3131

0 commit comments

Comments
 (0)