HI,
I need some help with Flow-Router.
Here is my Component that I am trying to route to
import React, {Component} from 'react';
import {Meteor} from 'meteor/meteor';
import {render} from 'react-dom';
export default class Home extends Component {
render() {
return(
<div id="Home" class="outer-container">
<h1> Flow router works </h1>
</div>
)
}
};
and here is the corresponding route.jsx file
import { Home } from '../imports/ui/components/Home.jsx';
FlowRouter.route("/", {
name: "Home",
action(params) {
ReactLayout.render(Home);
}
})
My main.jsx file is practically empty
Meteor.startup (()=>{
console.log("Client side Meteor started");
});
I am getting following error.
Warning: React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: undefined. You likely forgot to export your component from the file it's defined in.
Followed by
TypeError: React.render is not a function. (In 'React.render(el, rootNode)', 'React.render' is undefined)
What am I doing wrong?
Thanks
Sudheer