Add recommendation for event usage and firing
See original GitHub issueFor usage of events have a TLDR.
- wire-up to local DOM via @some-event in template (let Lit do the actual wire-up)
- wire-up events to this in constructor (no need to clean up - as it will be garbage collected on destroying)
- wire-up to elements outside of scope (ex. window) using connectedCallback , and remove them in disconnectedCallback.
For firing events have a TLDR.
- prefer “just” events without
bubble
orcomposed
e.g.new Event('something-happened')
- when needing data consider extending
Event
or usingCustomEvent
- use
bubble: true
if a node up the tree needs the event - retrain from using
composed: true
as it leads to event pollution - use composed only if absolutely needed
Add a link for details too https://dev.to/open-wc/composed-true-considered-harmful-5g59
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:5 (5 by maintainers)
Top Results From Across the Web
[GA4] Recommended events - Analytics Help - Google Support
The Events report provides recommendations on events to collect based on the data you already collect or the app category in the Google...
Read more >Navigate Meta Events Manager for website events - Facebook
You can see your web event data in Meta Events Manager after you add the Meta ... Use Test Events to check that...
Read more >Event Planning Checklist - Special Events
Use this handy checklist to ensure your event is on track and on budget. ... Recommend they are added to your phone for...
Read more >Adding Event Tracking & Triggering - Qualtrics
Under the Intercepts section, open the Intercepts tab and select the Intercept to which you would like to add event tracking. · Click...
Read more >How to Host a Successful Virtual Event: 10 Tips - Hootsuite Blog
10 tips for hosting virtual events · 1. Set clear goals from the start · 2. Choose the right platform to host your...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
related/the same: https://github.com/open-wc/open-wc/issues/895#issuecomment-554067855
Maybe even a codelab?