Reactjs – React – How to render a component inside HTMLElement ref?
Given a HTMLElement ref created by React.useRef(), is it possible to render a new Component inside of it? For example: const DemoComponent: React.FunctionComponent = () => { const ref = React.useRef<HTMLElement>(null); useRenderExample(ref); return ( <> <div ref={ref}>RENDER_PLACEHOLDER</div> <div>Some other elements…