Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

inject-reducer

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inject-reducer

Inject Redux reducer with HOC

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Inducer

Build Status GitHub license PRs Welcome

Inject Redux Reducer in a HOC way!

Install

$ yarn add inducer

Show me how!

// YourComponent.js
import gameReducer from './gameReducer';
import injectReducer from 'inducer';

class YourComponent extends React.Component {
  // component logic here
}
export default injectReducer({
  game: gameReducer
})(YourComponent);
// App.js
import React from 'react';
import { Provider } from 'react-redux';
import YourComponent from './YourComponent.js'

export default function App({ store }) {
  return (
    <Provider store={store}>
    <!-- this is important as the HOC will get the store 
      from the context provided by the store provider -->
      <YourComponent />
    </Provider>
  )
}

FAQs

Package last updated on 07 Sep 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc