Issue while appending a child to a div in react typescript

I am trying to add a image tag dynamically on a useref

   let myRef=useRef(null)
   const newElement = document.createElement('image');

i am getting the following error and how i set height and width to the image while creating

Property 'appendChild' does not exist on type 'never'. TS2339

Read more here:

Content Attribution

This content was originally published by Tej at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: