diff --git a/content/ember/v3/partial.md b/content/ember/v3/partial.md new file mode 100644 index 00000000..9bf88081 --- /dev/null +++ b/content/ember/v3/partial.md @@ -0,0 +1,40 @@ +--- +id: ember.partial +title: Deprecate `{{partial}}` +until: '4.0.0' +since: '3.15' +--- + +We are deprecating usage of `{{partial}}` in accordance with [RFC #449](https://github.com/emberjs/rfcs/blob/master/text/0449-deprecate-partials.md). + +Partials should be migrated to components. For example, consider the following `quick-tip` partial: + +```hbs +{{! app/templates/application.hbs }} +{{#let (hash title="Don't use partials" body="Components are always better") as |tip|}} + {{partial "partials/quick-tip"}} +{{/let}} +``` + +```hbs +{{! app/templates/partials/quick-tip.hbs }} +
{{tip.body}}
+ +``` + +It can be converted to a component as follows: + +```hbs +{{! app/templates/application.hbs }} +{{#let (hash title="Don't use partials" body="Components are always better") as |tip|}} +{{@tip.body}}
+ +```