Hi guys, I am trying to use react-mounter as a layout manager, similar to @arunoda’s mantra example. But my MainLayout is rendering without the content component I am passing to it through FlowRouter. Any idea why that’s happening?
My router.jsx
FlowRouter.route('/', {
name: 'home',
action() {
mount(MainLayout, {
content: () => (<Home />)
});
}
});
My MainLayout
const MainLayout = ({content = () => null}) => (
<div className="MainLayout">
<header>
This is our header
</header>
<main>
{content}
</main>
</div>
);
export default MainLayout;
My Home.jsx
class Home extends React.Component {
render() {
return (
<div className="Home">
<h1>Home</h1>
</div>
);
}
}
export default Home;