From ea4e29d92e45feeefe327ac668efb59875e4447c Mon Sep 17 00:00:00 2001 From: Damian Stasik Date: Thu, 18 Jun 2020 09:49:13 +0200 Subject: [PATCH 1/2] doc(treeshaking): sync directive example with current API --- active-rfcs/0004-global-api-treeshaking.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/active-rfcs/0004-global-api-treeshaking.md b/active-rfcs/0004-global-api-treeshaking.md index e0f27504..01a4f044 100644 --- a/active-rfcs/0004-global-api-treeshaking.md +++ b/active-rfcs/0004-global-api-treeshaking.md @@ -73,11 +73,13 @@ In addition to public APIs, many of the internal components / helpers can be exp Can be compiled into the following (for explanation purposes, not exact output): ``` js -import { h, Transition, applyDirectives, vShow } from 'vue' +import { h, Transition, withDirectives, vShow } from 'vue' export function render() { return h(Transition, [ - applyDirectives(h('div', 'hello'), this, [vShow, this.ok]) + withDirectives(h('div', 'hello'), [ + [vShow, this.ok] + ]) ]) } ``` From ddb70fb36fa16da85b3f04f728b3410cd29e9741 Mon Sep 17 00:00:00 2001 From: Damian Stasik Date: Thu, 18 Jun 2020 10:10:29 +0200 Subject: [PATCH 2/2] docs(render-function): sync directive example with current API --- active-rfcs/0008-render-function-api-change.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/active-rfcs/0008-render-function-api-change.md b/active-rfcs/0008-render-function-api-change.md index 6a3e4b59..7fb2e94a 100644 --- a/active-rfcs/0008-render-function-api-change.md +++ b/active-rfcs/0008-render-function-api-change.md @@ -262,11 +262,10 @@ export default { const barDir = resolveDirective('bar') // - return withDirectives( - h(comp), + return withDirectives(h(comp), [ [fooDir, this.x], [barDir, this.y] - ) + ]) } } ```