score:0

because you used export default emailchanged, you can't get the value of emailchanged by destructing. remove the export default emailchanged line in your index.js and you should be good.

score:0

because you have the wrong import.

replace:

import {emailchanged} from 'torusteensapp/src/actions';

with:

import emailchanged from 'torusteensapp/src/actions';

here's a better explanation: difference between "import {something} from somelib" and "import something from somelib" react.js

score:4

in your index.js, you have exported the action emailchanged as a named export and you are again exporting the same as default. however you are only importing it as a named import. thats the reason for your error.

remove the default export for emailchanged.

import {email_changed} from './types';

export const emailchanged = (text) => {
    return {
        type: 'email_changed',
        payload: text
    };
};

onemailchange = (text) => {
    this.props.emailchanged(text);
};

however, i assume that your intension was to export default onemailchange function.

in that case change add

export default onemailchange to the index.js file.


Related Query

More Query from same tag