I'm new to React. I currently have a component. This component has a title and a body. The body can have several paragraphs and I want to dynamically add the elements depending on how many paragraphs each has. So right now I have this:
import React from 'react';
class Content extends React.Component{
render(){
var props_list = this.props;
var keys = Object.keys(props_list);
console.log(props_list["title"]);
for (var i = 0; i < keys.length; i++){
console.log(props_list[keys[i]]);
}
return (
<div className="introduction">
<h3>{props_list["title"]}</h3>
<div className="div-content">
</div>
</div>
);
}
}
export default Content;
Now with this code I can get all the props and information that it's added to each component but I have no clue how to add this information dynamically into the div-content.
Thank you in advance!