Skip to content

Commit

Permalink
switch to proper es6 module import syntax (addresses #14)
Browse files Browse the repository at this point in the history
  • Loading branch information
glortho committed Dec 21, 2015
1 parent 32e3e74 commit 39c2c39
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/decorators/class_decorator.js
Expand Up @@ -4,7 +4,7 @@
*/
import React from 'react';

import { setBinding } from '../store';
import store from '../store';
import { onMount, onUnmount } from '../event_handlers';

/**
Expand Down Expand Up @@ -44,7 +44,7 @@ function componentWrapper( WrappedComponent, keys = null ) {
}
}

setBinding( { keys, fn: KeyBoardHelper.prototype.handleKeyDown, target: KeyBoardHelper.prototype } );
store.setBinding( { keys, fn: KeyBoardHelper.prototype.handleKeyDown, target: KeyBoardHelper.prototype } );

return KeyBoardHelper;
}
Expand Down
6 changes: 3 additions & 3 deletions src/decorators/method_decorator.js
Expand Up @@ -2,7 +2,7 @@
* @module methodWrapper
*
*/
import { getBinding, setBinding } from '../store';
import store from '../store';
import { onMount, onUnmount } from '../event_handlers';

/**
Expand All @@ -19,7 +19,7 @@ function methodWrapper( { target, descriptor, keys } ) {

// if we haven't already created a binding for this class (via another
// decorated method), wrap these lifecycle methods.
if ( !getBinding( target ) ) {
if ( !store.getBinding( target ) ) {

const { componentDidMount, componentWillUnmount } = target;

Expand All @@ -35,7 +35,7 @@ function methodWrapper( { target, descriptor, keys } ) {
}

// add this binding of keys and method to the target's bindings
setBinding( { keys, target, fn: descriptor.value } );
store.setBinding( { keys, target, fn: descriptor.value } );

return descriptor;
}
Expand Down

0 comments on commit 39c2c39

Please sign in to comment.