vuejs / vuejs/docs

Creating web components with slots and render functions

Open
#2,276 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Vue
Stars
3.2k
Forks
5k
Avg merge
14d 17h
Merged PRs (30d)
1

Description

Vue can be used to create Web Components. The docs explain how to use slots here:

https://vuejs.org/guide/extras/web-components.html#slots

However, that explanation only holds when using a template. With a render function it is necessary to create an actual <slot> node, rather than using the usual Vue slots object. e.g.:

h('slot', { name: 'slot-name' })

This isn't currently documented.

More details in https://github.com/vuejs/core/issues/7843.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Web Components guide's Slots section at the linked vuejs.org page and compare its template guidance with the render-function case described here. Document that render functions need an actual h('slot', { name: 'slot-name' }) node, and verify the explanation against the linked Vue core issue.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.