From 8309be6c3b86f3deb351d1071447bcd9f816e63c Mon Sep 17 00:00:00 2001 From: Victor Turansky Date: Thu, 2 Jan 2025 15:38:55 +0200 Subject: [PATCH] React. Separate file for `isValidElement` --- .../src/jsMain/kotlin/react/IsValidElement.kt | 7 +++++++ kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 kotlin-react-core/src/jsMain/kotlin/react/IsValidElement.kt diff --git a/kotlin-react-core/src/jsMain/kotlin/react/IsValidElement.kt b/kotlin-react-core/src/jsMain/kotlin/react/IsValidElement.kt new file mode 100644 index 0000000000000..96590992e948a --- /dev/null +++ b/kotlin-react-core/src/jsMain/kotlin/react/IsValidElement.kt @@ -0,0 +1,7 @@ +@file:JsModule("react") + +package react + +external fun isValidElement( + element: Any?, +): Boolean diff --git a/kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt b/kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt index 9349eb8a7c705..65520467259a6 100644 --- a/kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt +++ b/kotlin-react-core/src/jsMain/kotlin/react/ReactElement.kt @@ -13,7 +13,3 @@ external fun

createElement( props: P? = definedExternally, vararg children: ReactNode?, ): ReactElement

- -external fun isValidElement( - element: Any?, -): Boolean