Skip to content

Commit 48c1c47

Browse files
committed
update Vue.partial recommendations in migration guide
1 parent 673562e commit 48c1c47

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/guide/migration.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1531,7 +1531,11 @@ Use components instead.
15311531

15321532
### `Vue.partial` <sup>deprecated</sup>
15331533

1534-
Use [functional components](render-function.html#Functional-Components) instead.
1534+
Partials have been deprecated in favor of more explicit data flow between components, using props. Unless you're using a partial in a performance-critical area, the recommendation is to simply use a [normal component](components.html) instead. If you were dynamically binding the `name` of a partial, you can use a [dynamic component](http://vuejs.org/guide/components.html#Dynamic-Components).
1535+
1536+
If you happen to be using partials in a performance-critical part of your app, then you should upgrade to [functional components](render-function.html#Functional-Components). They must be in a plain JavaScript file (rather than in a `.vue` file) and are stateless and instanceless, just like partials. This makes rendering extremely fast.
1537+
1538+
A benefit of functional components over partials is that they can be much more dynamic, because they grant you access to the full power of JavaScript. There is a cost to this power however. If you've never used a component framework with render functions before, they may take a bit longer to learn.
15351539

15361540
{% raw %}
15371541
<div class="upgrade-path">

0 commit comments

Comments
 (0)