Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this.args is undefined inside component after enabling proxy #18202

Closed
gokatz opened this issue Jul 15, 2019 · 5 comments
Closed

this.args is undefined inside component after enabling proxy #18202

gokatz opened this issue Jul 15, 2019 · 5 comments

Comments

@gokatz
Copy link

gokatz commented Jul 15, 2019

In glimmer components, the named arguments are supposed to be accessible via this.args property. But after enabling proxy access, I can't access the arguments and it is coming something like Symbol(magic-prop). With the previous SHA, I can able to get the args without any issue.

Reproduction: https://codesandbox.io/s/my-app-tdwwx
In this sandbox, name argument has been accessed inside formattedName getter.

Is there any other way I can access the arguments? Thanks for any help.

@MrRobz
Copy link

MrRobz commented Jul 15, 2019

yes facing the same issue in glimmer components when using commit b6a3ecd in ember-source
this.args.prop-name gives undefined in its component.js

@CvX
Copy link
Contributor

CvX commented Jul 16, 2019

Looks like something went wrong in #17835. @pzuraq

@pzuraq
Copy link
Contributor

pzuraq commented Jul 16, 2019

It’s more likely that the way that GlimmerComponent assigns args to the instance of the class is not compatible with the new autotracking strategy, since we test args out with a “Glimmerish” component that implements the same API. I’m currently working on fixing the transpilation bugs that keep popping up, but then this will be my next priority.

@pzuraq
Copy link
Contributor

pzuraq commented Jul 19, 2019

This should be fixed by glimmerjs/glimmer.js#201

@kennethlarsen
Copy link
Member

We're facing this as well. Thank you for your swift work, @pzuraq

@pzuraq pzuraq closed this as completed Feb 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants