From Django I am used to following frontend structure:
<body>
<div id="main_container">
<div id="header">
{% include "topbar.html" %}
</div>
<div id="leftbox_scroll">
{% include "left_up.html" %}
</div>
<div id="ggladsleftcontain">
{% include "ggladsleft.html" %}
</div>
<div id="main_content_wrap">
<div id="main_content">
{% block main_content %}
{% endblock %}
</div>
</div>
<div id="rightside">
{% include "right_side.html" %}
</div>
<div class="clearer"> </div>
</div>
</body>
This setups the basic structure of the page: header, bars to left,right, scrollmenu and a content area. When the user navigates somewhere the server responds with a content file. Such files contains only the requested content that replaces the "block main content" area. The header and sidebars are called by "extends home.html" at the top of the content file.
Is similar functionality possible in React or should my render method for every page contain header and bars? I would hope for something like this:
//main.jsx
render() {
return (
<div>
<PublicHeader/>
<LeftBar/>
<Content page={this.page}/>
<RightBar/>
<Footer/>
</div>
)
}
I have only a vague idea how that content would catch the current page the user navigated to and even a less claer idea of how he would process and show the page. So, probably this is the wrong way of thinking about it ... but still do I have to header and bars defined in every page?
EDIT: I have abandoned django's frontend completely, everything is going to jsx files, only the bundle.js is placed in to a simple index.html.