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

Disconnect from ember set #69

Open
amk221 opened this issue Mar 4, 2024 · 1 comment
Open

Disconnect from ember set #69

amk221 opened this issue Mar 4, 2024 · 1 comment

Comments

@amk221
Copy link

amk221 commented Mar 4, 2024

Using this addon means you don't need to use @tracked. But tracked is the preferred thing to use these days.

Can this addon be updated to use normal assignment instead?

(I understand it probably uses ember set behind the scenes just because that processes deep paths, but you could get that from lodash.set for example)

@johanrd
Copy link
Contributor

johanrd commented Mar 7, 2024

Hi. Yes, I think that may be a good idea for a next release. When converting to TS, there were three levels of maturity I considered, of which I landed on 2) for full backwards compatibility for apps already on ember > 4.5:

Level 1) Import { helper } & import { set } – ie. fully backwards compatible with all apps using the V1 addon
Level 2) Plain function helper, still with import { set } – only compatible with ember >= 4.5, but with better glint support.
Level 3) Plain function helper with normal assignment. – This works just fine as long as you have made sure to declare the variables in js before setting them from the template. I.e. not always fully "business logic" backwards compatible (but delcaring variables in js is good practice, and anyways required in gts/gjs)

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

2 participants