Receiving "Attempted import error:" in react app

Andrew
:

I am receiving the following error when trying to run my React app:

./src/components/App/App.js
Attempted import error: 'combineReducers'
is not exported from '../../store/reducers/'.

Here's how I'm exporting combineReducers:

import { combineReducers } from 'redux';
import userReducers from './userReducers';
import articleReducers from './articleReducers';

export default combineReducers({
    userReducers,
    articleReducers
});

and here's how I'm importing it in App.js:

import { combineReducers } from '../../store/reducers';

What's incorrect in how I'm exporting combineReducers?

Colin Ricardo
:

import { combineReducers } from '../../store/reducers';

should be

import combineReducers from '../../store/reducers';

since it's a default export, and not a named export.

There's a good breakdown of the differences between the two here.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Attempted import error: 'getMoviesList' is not exported from './actions'; error in react redux

From Java

Upgrade to Firebase JS 8.0.0: Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

From Java

Attempted import error: 'uuid' does not contain a default export (imported as 'uuid') In React

From Dev

Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs'

From Dev

Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs'

From Dev

Weather App with React, Prop not receiving and updating

From Dev

React app receiving promise instead of json object

From Dev

Websocket event receiving old redux state in React app

From Dev

Receiving React Native events while app is in sleep mode

From Dev

Receiving Notfication when app is running

From Dev

Receiving intent if the activity/app is destroyed

From Dev

Receiving SMS messages in my app

From Dev

Receiving Notfication when app is running

From Dev

Not receiving Emails on Google App Engine

From Dev

Android app keeps receiving notifications

From Dev

react not receiving prop from html

From Dev

iBeacon app - receiving/transmitting at the same time

From Dev

Android app crashing on receiving intent bundle?

From Dev

GCM XMPP App Server Not Receiving Downstream Errors

From Dev

Receiving a Spring RequestMappingHandlerMapping error in Google App Engine

From Dev

App Crashes upon receiving data from intent

From Dev

Express js, app.post not receiving connection

From Dev

Sending and receiving data from an app over the internet

From Dev

Not receiving data for google analytics for android app

From Dev

Receiving POST data in PHP from ASP app

From Dev

How long before receiving downloads on android app?

From Dev

App Crashes upon receiving data from intent

From Dev

Express js, app.post not receiving connection

From Dev

Grails app won't run, but receiving no errors

Related Related

  1. 1

    Attempted import error: 'getMoviesList' is not exported from './actions'; error in react redux

  2. 2

    Upgrade to Firebase JS 8.0.0: Attempted import error: 'app' is not exported from 'firebase/app' (imported as 'firebase')

  3. 3

    Attempted import error: 'uuid' does not contain a default export (imported as 'uuid') In React

  4. 4

    Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs'

  5. 5

    Attempted import error: 'default' is not exported from '../assertThisInitialized/_index.mjs'

  6. 6

    Weather App with React, Prop not receiving and updating

  7. 7

    React app receiving promise instead of json object

  8. 8

    Websocket event receiving old redux state in React app

  9. 9

    Receiving React Native events while app is in sleep mode

  10. 10

    Receiving Notfication when app is running

  11. 11

    Receiving intent if the activity/app is destroyed

  12. 12

    Receiving SMS messages in my app

  13. 13

    Receiving Notfication when app is running

  14. 14

    Not receiving Emails on Google App Engine

  15. 15

    Android app keeps receiving notifications

  16. 16

    react not receiving prop from html

  17. 17

    iBeacon app - receiving/transmitting at the same time

  18. 18

    Android app crashing on receiving intent bundle?

  19. 19

    GCM XMPP App Server Not Receiving Downstream Errors

  20. 20

    Receiving a Spring RequestMappingHandlerMapping error in Google App Engine

  21. 21

    App Crashes upon receiving data from intent

  22. 22

    Express js, app.post not receiving connection

  23. 23

    Sending and receiving data from an app over the internet

  24. 24

    Not receiving data for google analytics for android app

  25. 25

    Receiving POST data in PHP from ASP app

  26. 26

    How long before receiving downloads on android app?

  27. 27

    App Crashes upon receiving data from intent

  28. 28

    Express js, app.post not receiving connection

  29. 29

    Grails app won't run, but receiving no errors

HotTag

Archive