DEV: Use template-only for RenderGlimmer helper (#20138)
We don't need a full glimmer component here - the class definition was empty. We can use templateOnly() for slightly improved performance. Setting `component.name` improves how MountWidget is displayed for debugging in the Ember Inspector browser extension.
This commit is contained in:
parent
ce531913a8
commit
c8f4a2cfb9
|
@ -1,4 +1,4 @@
|
|||
import Component from "@glimmer/component";
|
||||
import templateOnly from "@ember/component/template-only";
|
||||
import { setComponentTemplate } from "@ember/component";
|
||||
import { tracked } from "@glimmer/tracking";
|
||||
import { assert } from "@ember/debug";
|
||||
|
@ -129,7 +129,8 @@ export default class RenderGlimmer {
|
|||
connectComponent() {
|
||||
const { element, template, widget } = this;
|
||||
|
||||
const component = class extends Component {};
|
||||
const component = templateOnly();
|
||||
component.name = "Widgets/RenderGlimmer";
|
||||
setComponentTemplate(template, component);
|
||||
|
||||
this._componentInfo = {
|
||||
|
|
Loading…
Reference in New Issue