Firstly I create a variable liTagsPagination with <a> elements depending on sectionsXml size array. And after that insert that variable into htmlPagination. And finally render htmlPagination variable with all html content.
But the output in the view is only the content of liTagsPagination in plain text. In DOM the liTagsPagination is appended to <ul> but no as a different element.
render() {
let liTagsPagination = "";
this.state.sectionsXml.forEach(function(elementSection, indexSection) {
liTagsPagination += "<li><a id=\"_sectionPage"+ indexSection +"\" className=\"section\">"+(indexSection+1)+"<\/a><\/li>";
});
const htmlPagination = (
<div id="pages-nav-branch" className="col-xs-12 text-center">
<ul className="pagination pagination-section pagination-sm">
{liTagsPagination}
</ul>
</div>
);
return(
<div>
{htmlPagination}
</div>
)
}