gajus / redux-immutable

redux-immutable is used to create an equivalent function of Redux combineReducers that works with Immutable.js state.
Other
1.88k stars 82 forks source link

combineReducers not imported #60

Closed yankeeinlondon closed 7 years ago

yankeeinlondon commented 7 years ago

I'm attempting to use the combineReducers implementation provided here and use the suggested import syntax of:

 import { combineReducers } from 'npm:redux-immutable';

Note: I am using browserify so the package name must have the "npm:" prefix.

I get no errors on the import but if I log out the result of combineReducers I get undefined instead of a function. This is probably my error but any help you might have would be greatly appreciated.

Velenir commented 7 years ago

I don't think browserify supports ES6 modules by itself. And the 'npm:*' syntax. Are you using it with something like ember-browserify?

Then your issue may be this one. Solution Workaround -- don't use named imports, no other way.

If anything, you could try using rollupify (maybe with rollup-plugin-node-resolve). I actually don't know, never used it.

yankeeinlondon commented 7 years ago

yeah I'm using ember-browersify (guess I should have just said that). I'll try the destructuring approach now, the rollupify might be a fun weekend project.

yankeeinlondon commented 7 years ago

It appears destructuring will be an adequate solution for now, thanks for the pointer.