[Kotlin/JS for React] Is there a way to use React Portals?

The function I suppose I should use is:

createPortal( children: ReactNode?, container: Element, key: Key? = definedExternally, ) 

Problem is, I don’t know how to instantiate a ReactNode? object. Currently I’m using functional components, instatiating them with the FC function, which also returns an FC, not a ReactNode?.

I’ve seen in the different HTML tags in the HTML Typesafe DSL that there is a this.children object of type ReactNode?, but it seems to always be null.

submitted by /u/Poqazz
[link] [comments]