So, as a rule, our web application hosted in S3, index.html looks like this:
<div class=app></div>
It also refers to the JS package and which React renders and that fine. But some elements of the site are statically generated for speed and SEO and look like this:
<div class=app></div> <h1>Title</h1> <p>Information, blah blah blah</p> <p>Lots of content</p>
Ordinary wisdom can assume that there is static material in the ReactJS component and then reactDOM.renderToString() , but I do not want to do this, since it is rather difficult to do so, since the static component is pulled from many APIs.
So I'm struggling to find the documentation for what I want. I want to say that specific URLs require a full page load ( window.location ). Similarly, when navigating from a static content page, a full page load is required or the content should be replaced with <div class=app> .
How can I achieve this with a responsive router?
reactjs react-router
hendry
source share