We are building an enterprise application using react, redux and react-redux stack. I got stuck in one of the designs and need your help.
- We have got some html content, coming from the backend(PZN) and we don't wanna use dangerouslySetInnerHTML(as it's not the trusted source) , instead we would like to use iframe, where src attribute will point to locally stored one of the templates with some placeholders [values will be replaced after the backend call]. How do I bind values to the templates. do anybody know any client side templating engines like handlebars, EJS? Ex:
const Frame = ({src}) => {
return(
<iframe src = {src} ref = {(frame) => this.frame = frame} />
)
The above thing holds good If I just wanna dump the html content into the iframe, but I want to bind the some data values into template before being rendered on the UI?