Miss any of our Open RFC calls?Watch the recordings here! »

ember-singularity-mixins

3.0.0 • Public • Published

Ember Singularity Mixins

Build Status npm version

This addon consumes the unified event handling of Ember Singularity in order to provide easy-to-use and performant mixins for "spammy" events, such as scrolling, resizing, or touch events.

Note: If you use this addon, you do not need to include ember-singularity as a dependency as well.

Usage

All mixins can be imported using the following form:

import <MixinNamefrom 'ember-singularity-mixins/mixins/<mixin-name>';
export default Ember.Component.extend(<MixinName>);

They also have a function hook that uses the same name as the event which they handle. In other words, for the scroll-handler mixin it would simply be:

import ScrollHandler from 'ember-singularity-mixins/mixins/scroll-handler';
export default Ember.Component.extend(ScrollHandler, {
  scroll() {
    // Do stuff on scroll
  },
  // Other component properties and methods
});

Available Mixins

  1. scroll-handler
  2. resize-handler

Install

npm i ember-singularity-mixins

DownloadsWeekly Downloads

879

Version

3.0.0

License

MIT

Unpacked Size

8.03 kB

Total Files

7

Last publish

Collaborators

  • avatar
  • avatar