I have this function:
const getNameListMarkdown = (props: Props) => {
if (isDefined(props.details)) {
return (
Object.keys(props.details).map(x => <p>{props.details![x].name}</p>)
);
}
return '';
};
For some reason, when I then try to render this it is rendered as [object Object], [object Object], for example if I have two objects in the list. If I console log the Object.keys it writes out the strings as it should in the .name space. So it should return a string but it doesn't render as such. And if I check what I get back where I call this function it receives a vNode object where the string can be seen in the children array. Does anyone know how to properly do this?