Here I have something like below as HTMLElement
<div id='hiddenDiv'>
<div>foobar</div>
</div>
And I am doing something like below trying to convert it into JSX.Element:
function renderMailCompose(): JSX.Element {
const content = document.getElementById('hiddenDiv');
return content;
}
but I am getting the error
Type 'HTMLElement' is missing the following properties from type 'ReactElement<any, any>': type, props, key
I am wondering how I can properly convert the div including all its content to JSX.Element. Any help would be appreciated!