Remove emits, slots, and attrs concepts in Vue.
- 🤐 No need to define props, emits, slots, and attrs in runtime.
- 🦾 Fully TypeScript support.
- 👾 Non-invasive.
npm i vue-simple-props
import { defineSimpleComponent, useProps } from 'vue-simple-props'
interface Props {
foo: string
onClick: () => void
renderDefault?: () => JSX.Element
}
export const Comp = defineSimpleComponent<Props>({
name: 'Comp',
setup() {
const props = useProps<Props>()
return () => <div>...</div>
},
})