Meteor 1.3. How to es6?

Surly nothing wrong here:

import React from 'react';

class Home extends React.Component {
    render() {
        return <h1>Hello !</h1>;
    }
}

export default Home;

Console error:

Warning: 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)

Uncaught Invariant Violation: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: undefined.

How are you consuming Home?

Sorry for late reply, @kako

What do you mean in layman’s term? My directory is this: client > components > Home > Home.jsx

Router:

import React from 'react';
import {mount} from 'react-mounter';
import {Home} from './components/Home/Home.jsx';

FlowRouter.route("/", {
  action() {
    mount(Home)
  }
});

import {Home} from ... required export default {Home: Home}
import Home from ... required export default Home

2 Likes

Thank you. Such a minor thing I’ve never noticed!