Skip to content

Issue: Incorrect Usage of 'redux-thunk' Module #21

Open
@crazycodescat

Description

@crazycodescat

**Issue: Incorrect Usage of 'redux-thunk' Module

Description:
When attempting to apply middleware in the Redux store configuration, an error is encountered due to incorrect usage of the 'redux-thunk' module. The code attempts to import the 'redux-thunk' middleware and apply it using the 'applyMiddleware' function. However, the error message indicates that the module does not export a member named 'default', leading to a SyntaxError during module import.**

Error:
import thunk from "redux-thunk";
^^^^^
SyntaxError: The requested module 'redux-thunk' does not provide an export named 'default'

**import thunk from "redux-thunk";

const store = createStore(
reducer,
applyMiddleware(logger.default, thunk.default)
);**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy