Skip to content

Commit cecc760

Browse files
committed
Fix unknown props issues with DOM components
1 parent ddf7d79 commit cecc760

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

docs/Glossary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,8 @@ The term *route component* refers to a [component](#component) that is directly
204204
- `route` – The [route](#route) that declared this component
205205
- `routeParams` – A subset of the [params](#params) that were specified in the route's [`path`](#routepattern)
206206
207+
Route components should generally be component classes rather than strings. This will avoid potential issues with passing the injected props above to DOM components.
208+
207209
## RouteConfig
208210
209211
```js

examples/huge-apps/app.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
/*eslint-disable no-unused-vars */
21
import React from 'react'
32
import { render } from 'react-dom'
43
import { Router, browserHistory } from 'react-router'
5-
import stubbedCourses from './stubs/COURSES'
4+
5+
import './stubs/COURSES'
66

77
const rootRoute = {
8-
component: 'div',
98
childRoutes: [ {
109
path: '/',
1110
component: require('./components/App'),

0 commit comments

Comments
 (0)