gajus / redux-convention

Facilitates conversion of Flux Standard Action (FSA) to Canonical Composition Action (CCA) and vice-versa.
Other
15 stars 1 forks source link

React native convention.middleware == convention.mapper #3

Open vitaminwater opened 9 years ago

vitaminwater commented 9 years ago

I don't really understand the index.js generated by gulp:

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { 'default': obj }; }

var _mapper = require('./mapper');

var _mapper2 = _interopRequireDefault(_mapper);

var _mapper3 = _interopRequireDefault(_mapper);

how is the middleware package exported here ?

and in my code, if I try this:

console.log(convention.middleware == convention.mapper);

I get true as output.

Which is not really what is intended in the source index.js:

import mapper from './mapper';
import middleware from './middleware';

export {
    mapper,
    middleware
};

and forces to write:

(store) => (next) => (action) => next(convention.fromCCAtoFSA(action)),