Skip to content

Commit 6fa4ba4

Browse files
Added a note about prop modifiers on render function examples (#1712)
* feat: added explanation on prop modifiers * fix: fixed quotes * fix: fixed autoformatting * fix: reverted change for .attr modifier * fix: tweaked the wording on prefixes
1 parent 732633c commit 6fa4ba4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/guide/extras/render-function.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ h('div', { id: 'foo' })
3939
// Vue automatically picks the right way to assign it
4040
h('div', { class: 'bar', innerHTML: 'hello' })
4141

42+
// props modifiers such as .prop and .attr can be added
43+
// with '.' and `^' prefixes respectively
44+
h('div', { '.name': 'some-name', '^width': '100' })
45+
4246
// class and style have the same object / array
4347
// value support that they have in templates
4448
h('div', { class: [foo, { bar }], style: { color: 'red' } })

0 commit comments

Comments
 (0)