I'm trying to create the structure of a basic Meteor app with React: This is the main.html
<head>
<title>test</title>
</head>
<body>
<div id="render-target"></div>
</body>
this is the startup function
Meteor.startup(function () {
ReactDOM.render(<AppLayout />, document.getElementById("render-target"));
});
and this is the app layout
AppLayout = React.createClass({
render() {
return (
<div className="wrapper">
{this.props.nav}
{this.props.content}
{this.props.footer}
</div>
)
}
});
from what I understand the
ReactDOM.render(<AppLayout />, document.getElementById("render-target"));
should replace the div "render-target" with the AppLayout element (the "wrapper" div), but when i run the app, inside the body i see two div: the "render-target" and the "react-root".
As you can see here
why is the "render-target" div still there and the "wrapper" is duplicated?
EDIT:
the router part is
FlowRouter.route("/", {
name: "HomePageRoute",
action:function() {
ReactLayout.render(AppLayout, {
nav: <NavBar />,
content: <HomePageContainer />,
footer: <Footer/>
});
}
});