I've been doing some research online and I noticed that the create element function is being called with children as strings instead of objects. Thanks for any help!
Below is the code:
export function createElement(tag: string, props?: any, ...children: JSX.Element[]){
let el = "<"+tag+">";
if(props != undefined){
for(let i of children){
if(i == undefined)
throw new Error("Expected class got undefined");
else{
}
}
}
el+= "</"+tag+">";
return el;
}
Any suggestions on how I can ensure that children are not an array of strings?