The problem is the following:
I bring the HTML from MongoDB and charge it in react with:
<div dangerouslySetInnerHTML={{ __html: products.content.title }} />
It is displayed correctly.
Now, what I want is that in the HTML that I post, I can have variables set such as:
<h2>{{ product.title }}</h2>
and that when loading them from the database, React I caught them correctly.
I am loading the HTML in React with the webpack loader 'html-loader'.
Any ideas?
link