# Js() function not support spread operator?

**URL:** <https://discuss.kotlinlang.org/t/js-function-not-support-spread-operator/17335>\
**Category:** JavaScript\
**Created:** [April 25, 2020, 7:04pm UTC](https://discuss.kotlinlang.org/t/js-function-not-support-spread-operator/17335 "2020-04-25T19:04:43Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![cisimon7](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/cisimon7/32/7451_2.png) [@cisimon7](https://discuss.kotlinlang.org/u/cisimon7)\
**Post date:** [May 9, 2020, 10:40pm UTC](https://discuss.kotlinlang.org/t/js-function-not-support-spread-operator/17335/10 "2020-05-09T22:40:30Z")

</div>

Hello @bashor (or anyone who can help) , how about destructuring props into a component in React? How would you go about that in kotlin?

For example in react, we pass all the props into a component using the spread operator. As in:

`<Component {... props} />`

Tried using the js() function for this too, but compilation error.

---

_[View the full topic](https://discuss.kotlinlang.org/t/js-function-not-support-spread-operator/17335)._
