Ember Subs ◎ | Latest |

// app/components/price-display.js import Component from '@glimmer/component'; import inject as service from '@ember/service'; export default class PriceDisplayComponent extends Component @service priceFeed;

// Publish this.eventBus.trigger('data-updated', some: 'data' ); ember subs

⚠️ Use sparingly – overuse makes data flow hard to trace. | Pitfall | Fix | |---------|-----| | Forgetting to unsubscribe | Always call disconnect() or .off() in willDestroy | | Memory leaks | Check that references to components/services are cleared | | Stale data | Verify subscription updates tracked properties correctly | | Multiple subscriptions | Use a single service as the source of truth | // app/components/price-display