From 3dc842c0c05960cf898d7357f061dbbc704449b9 Mon Sep 17 00:00:00 2001 From: Ricardo Mendes Date: Wed, 19 Dec 2018 20:37:56 +0000 Subject: [PATCH] Update and rename 0000-deprecate-route-render-methods.md to 0418-deprecate-route-render-methods.md --- ... => 0418-deprecate-route-render-methods.md} | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) rename text/{0000-deprecate-route-render-methods.md => 0418-deprecate-route-render-methods.md} (92%) diff --git a/text/0000-deprecate-route-render-methods.md b/text/0418-deprecate-route-render-methods.md similarity index 92% rename from text/0000-deprecate-route-render-methods.md rename to text/0418-deprecate-route-render-methods.md index 68bac6a2fd..3a1c4770bc 100644 --- a/text/0000-deprecate-route-render-methods.md +++ b/text/0418-deprecate-route-render-methods.md @@ -1,16 +1,18 @@ - Start Date: 2018-19-12 -- RFC PR: (leave this empty) +- RFC PR: https://github.com/emberjs/rfcs/pull/418 - Ember Issue: (leave this empty) -# Summary +# Deprecate Route render APIs + +## Summary This RFC proposses the deprecation of [`Route#render`](https://emberjs.com/api/ember/3.6/classes/Route/methods/render?anchor=render), [`Route#renderTemplate`](https://emberjs.com/api/ember/3.6/classes/Route/methods/render?anchor=renderTemplate) and named `{{outlet}}` APIs. -# Motivation +## Motivation These APIs are largely holdovers from a time where components where not as prominent in your typical Ember application. While they are still documented, these APIs created an interesting coupling between the `Route` and the template. These APIs are also prone to breaking conventional naming conventions, which can lead to confusion for developers. -# Transition Path +## Transition Path The migration plan here is to just move to components for all the use cases you would use theses APIs for. For example, there was a time when you would do something like the following if you wanted to have a master-detail view for a shopping app. @@ -54,19 +56,19 @@ Luckily, we can express this entire concept with components. In the event you were using `model` to derive what to render, you can us the `{{component}}` helper to dynamically render a component. -# How We Teach This +## How We Teach This This has not been a mainline API for quite some time now. The guides do not mention this functionality at all. It is likely that the majority of Ember applications do not use these APIs. -# Drawbacks +## Drawbacks The drawback of this is we are saying that the `Route` and the route template of the same name are inherently coupled. In previous versions of Ember this didn't have to be so as long as you implemented `renderTemplate`. -# Alternatives +## Alternatives No real alternatives. -# Unresolved questions +## Unresolved questions Optional, but suggested for first drafts. What parts of the design are still TBD?