Skip to content

Commit 1a37a0f

Browse files
committed
[Doc]: Updates render function tip with note about h vuejs#1425
* cherry-pick & translate vuejs/v2.vuejs.org@882c21f
1 parent cbb2116 commit 1a37a0f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/v2/guide/render-function.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: 描画関数とJSX
3-
updated: 2019-01-20
3+
updated: 2019-02-03
44
type: guide
55
order: 303
66
---
@@ -494,7 +494,7 @@ new Vue({
494494
})
495495
```
496496

497-
<p class="tip">`createElement` を `h` にエイリアスしていることは、 Vue のエコシステムの中でよく見かける慣習です。そして、それは実は JSX には必須です。もし `h` がそのスコープ内で利用可能でない場合、アプリケーションはエラーを throw するでしょう。</p>
497+
<p class="tip">`createElement` を `h` にエイリアスしていることは、 Vue のエコシステムの中でよく見かける慣習です。そして、それは実は JSX には必須です。Vue の Babel プラグインの [バージョン 3.4.0](https://github.com/vuejs/babel-plugin-transform-vue-jsx#h-auto-injection) 以降では、ES2015 のシンタックスで宣言された JSX を含むメソッドや getter(関数やアロー関数は対象外)に対しては、自動的に `const h = this.$createElement` が注入されるため、`(h)` パラメーターは省略できます。それ以前のバージョンでは、もし `h` がそのスコープ内で利用可能でない場合、アプリケーションはエラーを throw するでしょう。</p>
498498

499499
より詳しい JSX の JavaScript へのマップの仕方については、[usage ドキュメント](https://github.com/vuejs/jsx#installation) をご参照ください。
500500

0 commit comments

Comments
 (0)