Question: Import JSX in Reflux Store not working

Question

Import JSX in Reflux Store not working

Answers 0
Added at 2016-11-05 23:11
Tags
Question

I have a module that I am trying to import into a Reflux store.

   /* ../util/ItemUtil.jsx  */

var ItemUtil = {

  isItemOwner(user, item) {
    return (user.id === item.user.id)
  }

}

export default ItemUtil;

but when I am trying to import this into my Reflux store

import ItemUtil from 'util/ItemUtil'
  
var ItemStore = Reflux.createStore({

  check(user, item) {
    ItemUtil.isItemOwner(user,item)
    /* the above statement fails with undefined */
  }
  
})

Answers to

Import JSX in Reflux Store not working

Source Show
◀ Wstecz