Skip to content

Remove emits, slots, and attrs concepts in Vue.

License

Notifications You must be signed in to change notification settings

eiis/vue-simple-props

 
 

Repository files navigation

vue-simple-props npm

Unit Test

Remove emits, slots, and attrs concepts in Vue.

Features

  • 🤐 No need to define props, emits, slots, and attrs in runtime.
  • 🦾 Fully TypeScript support.
  • 👾 Non-invasive.

Install

npm i vue-simple-props

Usage

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>
  },
})

Sponsors

License

MIT License © 2023 三咲智子

About

Remove emits, slots, and attrs concepts in Vue.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 87.0%
  • HTML 6.7%
  • Vue 5.1%
  • JavaScript 1.2%