Closed catamphetamine closed 8 years ago
Since there's no PropTypes.component
I guess that could be PropTypes.any
.
Please provide us with a code snippet/gist, so we can recreate your error.
AFAIK React.PropTypes.component
was a thing until React 0.12.0, then it has been renamed to element
.
As there weren't any issues with this so far, there might just be an error on your side.
@Scarysize Well, try to do this simple thing and you'll get the error:
import { RouterContext } from 'react-router'
<ReduxRouter RouterContext={RouterContext} />
As there weren't any issues with this so far, there might just be an error on your side.
As there weren't any issues with this so far, it means that no one used that feature.
Hm. I would like to be more specific than any
. But instanceOf
or componentName
seem to be a bit too restrictive. What's your opinion?
@Scarysize I googled yesterday for "React PropTypes Component" and found no really useful links except for a lot of static noise due to this particular word combination ambiguity.
That could be, say, anyOf(instanceOf(Component), functionOf(props, context(?)))
. A react guru would know. Should we summon someone from facebook? Let's try @gaearon
I would go with
React.PropTypes.oneOfType([
React.PropTypes.instanceOf(React.Component),
React.PropTypes.func
])
Will fix this today and republish :)
But
<RoutingContext/>
is a Component, not an Element https://github.com/reactjs/react-router/blob/master/modules/RoutingContext.js I guess you should fix thepropTypes
https://github.com/acdlite/redux-router/blob/master/src/ReduxRouter.js#L106