Skip to content

Guide to Vue slots for exchanging data and functionality between parent and child components

Notifications You must be signed in to change notification settings

dan-almenar/vue-slots-example

Repository files navigation

vue-slots-example

The sole purpose of this mini app is to showcase possible uses for the Vue <slot> tag, not only to add HTML elements to the child component directly from the parent's component <template> tag, but also to embed other components, or to retrieve data and even functions (methods) from the child component and use them directly on the parent. In no way the components functionality is design as they would in a real project.

Recommended IDE Setup

VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).

Customize configuration

See Vite Configuration Reference.

Project Setup

npm install

Compile and Hot-Reload for Development

npm run dev

Compile and Minify for Production

npm run build

Lint with ESLint

npm run lint

About

Guide to Vue slots for exchanging data and functionality between parent and child components

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published