DEV Community

Mykolas Mankevicius
Mykolas Mankevicius

Posted on

[TIL] SomeComponent.props to reuse a components props

Today I learned you can do this in a .vue component file:

<script>
import SomeComponent from "./SomeComponent.vue"

export default {
  props: {
    ...SomeComponent.props
  }
}
</script>
Enter fullscreen mode Exit fullscreen mode

This allows to write wrapped components much easier!

Top comments (0)