I have an array of html elements, lets say messages. And i want to render them as follow:
this.state.messages.push('<span className={Styles.success-message}>User successfully added</span>');
And in render method:
{this.state.messages.map((value, index) => {
return <div key={index}>{value}</div>
})}
But during my rendering instead of getting the message with appropriate style i m getting the entire element as string: