2.0 docs-- missing "slot" option on render function's data object
See original GitHub issueReferring to this part of the doc: http://vuejs.org/guide/render-function.html#The-Data-Object-In-Depth
When writing a render function, if you want to pass something in a named slot to a component, you have to write something like this:
createElement(component, { },
createElement('div', {
slot: 'some-named-slot'
}, [ <some content> ])
);
Currently, the documentation for createElement
’s data object doesn’t mention the slot
field.
CC: @chrisvfritz
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
2.0 docs-- missing "slot" option on render function's data ...
Reopening issue vuejs/vue#3841 against the vuejs.org repo per Evan. ... When writing a render function, if you want to pass something in a...
Read more >Render Functions & JSX | Vue.js
Slot functions can return anything a normal render function can return - which will always be normalized to arrays of vnodes when accessed...
Read more >Explaining the Vue Context Argument - A Composition API ...
In this article, we'll be taking a look at the setup function's context ... context.slots – an object with all of our template...
Read more >Vue render function - non-scoped slot - Stack Overflow
If you work with render functions, it is now recommended to always access slots via $scopedSlots , whether they currently use a scope...
Read more >Phoenix.Component — Phoenix LiveView v0.18.3 - HexDocs
The example above uses the default slot, accessible as an assign named @inner_block , to render HEEx content via the render_slot/2 function. If...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Sure, you can. Vue 2.0 offers both ways
@Shmasya In my case, I needed to write a render function to have more control than a template could provide. The beginning of the page on render functions (http://vuejs.org/guide/render-function.html) provides an example of why you might want to write one vs use a template.
@LinusBorg I’ll go ahead and open an issue against the vuejs.org repo per Evan