Skip to content

Commit c198249

Browse files
BTMPLtimdorr
authored andcommitted
Update react-router usage example (#1180)
The example is incorrect - you can't mix `children` and `component` prop. Looks like some left-over from v3 API?
1 parent ab77450 commit c198249

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

docs/api/Provider.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,9 @@ const store = createStore()
8888
ReactDOM.render(
8989
<Provider store={store}>
9090
<Router history={history}>
91-
<Route path="/" component={App}>
92-
<Route path="foo" component={Foo} />
93-
<Route path="bar" component={Bar} />
94-
</Route>
91+
<Route exact path="/" component={App} />
92+
<Route path="/foo" component={Foo} />
93+
<Route path="/bar" component={Bar} />
9594
</Router>
9695
</Provider>,
9796
document.getElementById('root')

0 commit comments

Comments
 (0)