With the introduction of the block {{let}} helper, it is now possible to replace usages of {{with}}.
The reason to deprecate {{with}} is that the conditional behaviour of the block not being rendered when the first parameter to {{with}} is falsey is confusing to users.
To give an example, before:
{{#with parent.child as |child|}}
{{child}}
{{else}}
No children!
{{/let}}
After:
{{#let parent.child as |child|}}
{{#if child}}
{{child}}
{{else}}
No children!
{{/if}}
{{/let}}
For convenience, an if-let helper could be proposed at a later stage.
With the introduction of the block
{{let}}helper, it is now possible to replace usages of{{with}}.The reason to deprecate
{{with}}is that the conditional behaviour of the block not being rendered when the first parameter to{{with}}is falsey is confusing to users.To give an example, before:
After:
For convenience, an
if-lethelper could be proposed at a later stage.