I have been trying to render the P_words list element word with react using map:
const f_data = {
key: 2412,
reviewed: 100,
rating:4,
P_words: [{
word: "Coolx",
freq: 5
},
{
word: "Dumbf",
freq: 6
}
]
So this is the code inside my function to render this list:
<ul>
Cool
{f_data.P_words.map((obj) => {
<li key={obj.freq}>{obj.freq}</li>;
})}
</ul>
I checked the DOM it shows cool but it shows a empty ul tag. Sorry if this is kind of vague.