I am trying to implement infinite-scroll to my blog, I have
const articlesHTML = document.querySelector(".articles");
as container. On each click on Load more button I want to append the new articles to the main html element, like this:
const results = articles
.slice(0, 10 * pager)
.map((articleID, i) => (
<Article key={i} id={articleID} />
));
articlesHTML.append(results);
however, results
is bunch of <Article/>
react components not html nodes, am I missing something?