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 { setComponentTemplate } from "@ember/component";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
import { assert } from "@ember/debug";
|
import { assert } from "@ember/debug";
|
||||||
|
@ -129,7 +129,8 @@ export default class RenderGlimmer {
|
||||||
connectComponent() {
|
connectComponent() {
|
||||||
const { element, template, widget } = this;
|
const { element, template, widget } = this;
|
||||||
|
|
||||||
const component = class extends Component {};
|
const component = templateOnly();
|
||||||
|
component.name = "Widgets/RenderGlimmer";
|
||||||
setComponentTemplate(template, component);
|
setComponentTemplate(template, component);
|
||||||
|
|
||||||
this._componentInfo = {
|
this._componentInfo = {
|
||||||
|
|
Loading…
Reference in New Issue