Skip to content

Commit

Permalink
React. Separate file for createElement
Browse files Browse the repository at this point in the history
  • Loading branch information
turansky committed Jan 2, 2025
1 parent 8309be6 commit 3d8b6ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 0 additions & 6 deletions kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,3 @@ sealed external interface ReactElement<P : Props> : ReactNode {
val props: P
val key: Key?
}

external fun <P : Props> createElement(
type: ElementType<P>,
props: P? = definedExternally,
vararg children: ReactNode?,
): ReactElement<P>
9 changes: 9 additions & 0 deletions kotlin-react-core/src/jsMain/kotlin/react/createElement.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@file:JsModule("react")

package react

external fun <P : Props> createElement(
type: ElementType<P>,
props: P? = definedExternally,
vararg children: ReactNode?,
): ReactElement<P>

0 comments on commit 3d8b6ed

Please sign in to comment.