You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

inst-redux-service-middleware

Package Overview
Dependencies
Maintainers
9
Versions
1985
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inst-redux-service-middleware

Service middleware for redux

22.11.0
npmnpm
Version published
Weekly downloads
310
-58.56%
Maintainers
9
Weekly downloads
 
Created
Source
  • While creating your store, register your services as key/value pairs with the service middleware constructor:
  applyMiddleware(
    createServiceMiddleware({
      myKey: myService,
      myOtherKey: myOtherService
    })
  )
  • In your action creator, dispatch an action with the following shape:
  {
    type: serviceMiddleware.CALL_SERVICE
    payload: {
      service: 'myKey'
      method: 'methodName'
      args: [arg1, arg2]
    }
  }

Subsequent calls to dispatch with your action creator will return the result of calling myService.methodName(arg1, arg2)

FAQs

Package last updated on 01 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts