Skip to content

Commit 42e6593

Browse files
leighsntimdorr
authored andcommitted
Readme: Add root path to Route component (#3724)
Just getting started with React-Router, but thought it was a little unclear that the root URL isn't specified in the Route that renders the App component. While /groups and /users will still render correctly, navigating to the root URL '/' will give an error.
1 parent 6bcb6b5 commit 42e6593

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/API.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ be rendered by the parent route component with `this.props.children`.
244244

245245
```jsx
246246
const routes = (
247-
<Route component={App}>
247+
<Route path="/" component={App}>
248248
<Route path="groups" component={Groups} />
249249
<Route path="users" component={Users} />
250250
</Route>

0 commit comments

Comments
 (0)