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

Do we need to await public Methods in Stencil components? #4731

Open
alionazherdetska opened this issue Feb 20, 2025 · 0 comments
Open

Do we need to await public Methods in Stencil components? #4731

alionazherdetska opened this issue Feb 20, 2025 · 0 comments
Labels
needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers

Comments

@alionazherdetska
Copy link
Contributor

alionazherdetska commented Feb 20, 2025

Description:
Stencil requires public methods decorated with @method() to return a Promise. This allows methods to be called before the component is fully initialized and ensures async behavior across all layers.

Question

  1. Do we need to always await @method() decorated methods inside our components?
  2. Are there specific cases where not awaiting could cause issues?
  3. Should we enforce await usage as best practice where necessary?

Image

@alionazherdetska alionazherdetska added the needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers label Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs: 🏓 dev roundtable To be discussed at the roundtable of esteemed developers
Projects
Status: 👀 Triage
Development

No branches or pull requests

1 participant