Hi,
I have an issue on my meteor + react app.
Until now, all my pages worked, but i’ve created a new one which does not work with the following error :
arning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). react-runtime-dev.js:1697:9
Error: Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.
I tried a lot but don’t understand why i have this error.
Here my page :
C.AdShow = React.createClass({
mixins: [ReactMeteorData],
getMeteorData() {
return {
ad: Ads.findOne(FlowRouter.getParam('adId')),
userAd: Meteor.users.findOne(this.data.ad.user)
}
},
render() {
return (
<div className="container clearfix">
test
</div>
)
}
});
And my router :
var adsRoute = FlowRouter.group({
prefix: '/ads',
name: 'ads',
});
adsRoute.route("/view/:adId", {
name: "ViewAd",
action(params) {
DocHead.removeDocHeadAddedTags();
DocHead.setTitle( 'Ads page title' );
DocHead.addMeta({name: "description", content: "My account page description"});
renderMainLayoutWith(<C.MainMenu />, <C.AdShow />);
}
});
Do you have any idea what i did wrong ?
Thx
Jerome