Skip to content

Commit c93e5e7

Browse files
authored
Update Router "component" propType spec.
Passing a React Component (which doesn't have a proptype anymore :|) generates a PropType error in the console. This will let it pass. (this mostly matches the handler propType spec, with the addition of string.)
1 parent d3415fd commit c93e5e7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Router.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ function createRouter(name, component) {
2828
propTypes: {
2929
component: React.PropTypes.oneOfType([
3030
React.PropTypes.string,
31-
React.PropTypes.element
31+
React.PropTypes.element,
32+
React.PropTypes.func
3233
])
3334
},
3435

0 commit comments

Comments
 (0)