Creating web components with slots and render functions
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
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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