This week your help is needed to bring tree-shaking 🌳 to Ember apps! RFCs on route actions and dynamic tags are ready for your comments 📢. We're also highlighting Ember for CodeSandbox ✨, and the awesome #30DaysOfEmber 📆 series. Read on!
A promising approach to reduce the size of Ember apps dramatically is known as tree-shaking. This describes a way to exclude any code from your bundle which is ultimately not needed for your application to work as expected.
Actions in Ember are usually defined in a controller. However the addon ember-route-action-helper has existed for some time and allows you to easily use actions, defined in the route, inside your templates. Some say that this allows less dependance on controllers. A new RFC (Request for Comments) for Route Actions has been suggested by @vasilakisfilthat proposes integrating this helper into Ember core for use in all apps without the need for the addon.
@cibernox has submitted a new RFC suggesting dynamic tag names in glimmer templates. In the transition from using inner-html semantics to using outer-html semantics in components there's one feature that has been lost: Being able to dynamically define the tag name of components.
To solve this issue the RFC proposes a new element helper that takes a tag name and generates a contextual component that, when invoked, renders the selected element. Like this:
CodeSandbox is an online code editor that helps you create web applications, from prototype to deployment. It supports a variety of web frameworks, and with the latest release, now officially supports Ember. This was made possible thanks to a pull request by @mike-north.