I' have react js project that does the nested rendering. I'm seeing the output on consoles, but no on the web.
<div>
{Experience &&
Experience.map((exp) => {
return (
<div className="text-white">
{
//Here we loop trough the exp keys
Object.keys(exp).forEach((key) => {
// console.log("key", key);
// console.log("key data", exp[key]);
// console.log(exp[key].desc);
return (
<p
dangerouslySetInnerHTML={{
__html: exp[key].desc, //this doesnt display
}}
/>
);
})
}
</div>
);
})}
</div>
Experience? If this value comes from Firebase, show the code for how you read it and pass it to the rendering, and the data that you're reading from the database.Object.keys(exp).mapinstead of foreach. If this is the data structure ofExperience.const Experience = [ { abc: { desc: '<p>abc</p>' }, efg: { desc: '<p>efg</p>' } }, { hij: { desc: '<p>hij</p>' }, klm: { desc: '<p>klm</p>' } } ];className="text-white"is not hiding the data because your text is white and background is also white. I hope it's not !! but happened to me as I have bootstrap styles.