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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more