🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

inst-redux-service-middleware

Package Overview
Dependencies
Maintainers
9
Versions
1958
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.6.0
latest
npm
Version published
Weekly downloads
464
-5.69%
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 26 May 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