# Combine Kotlin an jsx files

**URL:** <https://discuss.kotlinlang.org/t/combine-kotlin-an-jsx-files/26097>\
**Category:** Multiplatform\
**Created:** [December 14, 2022, 2:30pm UTC](https://discuss.kotlinlang.org/t/combine-kotlin-an-jsx-files/26097 "2022-12-14T14:30:54Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![LeaveX007](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@LeaveX007](https://discuss.kotlinlang.org/u/LeaveX007)\
**Post date:** [December 14, 2022, 2:30pm UTC](https://discuss.kotlinlang.org/t/combine-kotlin-an-jsx-files/26097/1 "2022-12-14T14:30:54Z")

</div>

Hy,

i have created a Project like this article, [https://kotlinlang.org/docs/multiplatform-full-stack-app.html#set-up-the-frontend](https://kotlinlang.org/docs/multiplatform-full-stack-app.html#set-up-the-frontend)

If i started this, then all would be good and all is running. Now i need to implement js file like these Structure:

```auto
export default function Car() {
...
    return (
        <Box>...</Box>
    );
}

```

Then i write an adapter for this, to implement in kotlin:  
@JsModule(“./Car”)  
@JsNonModule  
external val Car : FC\< BoxProps\>

Now the problem is, i get an error like that:

 ![grafik](https://us1.discourse-cdn.com/flex019/uploads/kotlinlang/original/2X/a/a579836ea7970d19d0a00435150d95c32e4430e5.png)

Can anyone help me please about that? Thank you.

Br  
Mike

---

<div class="post-metadata">

**Author:** ![arocnies](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/arocnies/32/5143_2.png) [@arocnies](https://discuss.kotlinlang.org/u/arocnies)\
**Post date:** [December 14, 2022, 7:29pm UTC](https://discuss.kotlinlang.org/t/combine-kotlin-an-jsx-files/26097/2 "2022-12-14T19:29:42Z")

</div>

Where did you see JSX being used with Kotlin? I’ve never heard of anyone using JSX (or would it be called “KX” since it’s Kotlin instead of Javascript) with Kotlin myself.

Usually, it’s an HTML DSL like in the documentation you linked.

Even when making a [React app with Kotlin](https://kotlinlang.org/docs/js-react.html#add-videos-using-kotlin-constructs-in-markup) you still use HTML builders

```kotlin
div {
    css {
        position = Position.absolute
        top = 10.px
        right = 10.px
    }
    h3 {
        +"John Doe: Building and breaking things"
    }
    img {
        src = "https://via.placeholder.com/640x360.png?text=Video+Player+Placeholder"
    }
}

```

---

<div class="post-metadata">

**Author:** ![LeaveX007](https://avatars.discourse-cdn.com/v4/letter/l/f475e1/32.png) [@LeaveX007](https://discuss.kotlinlang.org/u/LeaveX007)\
**Post date:** [December 14, 2022, 8:36pm UTC](https://discuss.kotlinlang.org/t/combine-kotlin-an-jsx-files/26097/3 "2022-12-14T20:36:17Z")

</div>

Hy,

thanks. Kotlin create JS-Files with Webpack. I need to use also external JS-Files and not only with HTML-Builders.

Br  
Mike
