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

write-after-read-in-render and setSourceDestroying deprecations triggered using recognize-gesture modifier #136

Open
lupestro opened this issue Jan 30, 2021 · 1 comment

Comments

@lupestro
Copy link
Contributor

Using the {{recognize-gesture}} modifier, two deprecations are triggered.

The write-after-read-in-render occurs because the retrieve() method of the -gestures service is writing then reading an object that is managed using get and set, and the call to the service is occurring in the modifier constructor, which is called during a render.

The solution is to move the activity to the didInstall(), and put it and the subsequent activity in didInstall()behind aPromise.resolve().thenblock, asdidInstall()` is also called during render. (The non-modifier code already had a comparable deferral.)

The other deprecation occurs in ember-class-based-modifiers. The issue was fixed in ember-modifiers (the successor to ember-class-based-modifiers) in a recent release, so we just need to change the dependency.

I'll be issuing a PR shortly, but I wanted to make this easy to find.

@lupestro
Copy link
Contributor Author

#137

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

1 participant