Ember.js: Should combination of {{#let (concat [component name]) as |ComponentName|}}{{/let}} work without using component helper

Created on 16 Jan 2020  路  5Comments  路  Source: emberjs/ember.js

Yesterday, I was asking @lifeart a question about https://github.com/lifeart/ember-ast-hot-load ability to work with Angle Brackets components and Octane.
And when I sent him a code snippet with code that did not hotload correctly I noticed that I forgot to use component helper in the combination with let. I did not receive any errors, so I tried to do the same in the freshly generated app, and both versions worked.

So my question is: is this a bug that first version works or is it intended behavior?

{{!-- Why does this code work? --}}
{{#let (concat "button-component") as |Button|}}
  <Button>
    Click me
  </Button>
{{/let}}

{{#let (component (concat "button-component")) as |Button|}}
  <Button>
    Click me
  </Button>
{{/let}}

P.S In my real code, I used concat to build a component name in the runtime, in the example, I just simplified the code.

Bug Help Wanted

Most helpful comment

All 5 comments

Now that we have updated to the latest version of glimmer-vm here we should see if this still happens.

It is happening in 3.17.

Ya, this is definitely not good. We should not be rendering a component without the (component helper here.

I'm going to close in favor of https://github.com/emberjs/ember.js/issues/17744 which has more info.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Yelinz picture Yelinz  路  47Comments

marcoow picture marcoow  路  59Comments

workmanw picture workmanw  路  79Comments

alexander-alvarez picture alexander-alvarez  路  30Comments

robharper picture robharper  路  75Comments