Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Aman Khalid amnox

🎯
Focusing
View GitHub Profile
@amnox
amnox / injectReducer.js
Created Mar 25, 2019
A demo implementation of Reducer Injection is React
View injectReducer.js
import React from 'react';
import PropTypes from 'prop-types';
import hoistNonReactStatics from 'hoist-non-react-statics';
import invariant from 'invariant';
import isEmpty from 'lodash/isEmpty';
import isFunction from 'lodash/isFunction';
import isString from 'lodash/isString';
import checkStore from './checkStore';
import createReducer from '../reducers';
import conformsTo from 'lodash/conformsTo';