Meteor + React issue : React.createElement: type should not be null,


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(
render() {
    return (
        <div className="container clearfix">

And my router :

var adsRoute ={
    prefix: '/ads',
    name: 'ads',

adsRoute.route("/view/:adId", {
    name: "ViewAd",
    action(params) {
        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 ?


Just a wild stab in the dark without a full trace or code but usually that indicates one of the components you are passing is undefined. Maybe you should log or check on C.MainMenu and C.AdShow to verify they are defined.

Not really familiar with FlowRouter so maybe you have some other non-obvious components you should also check.