Skip to content

Instantly share code, notes, and snippets.

Avatar

Keshav Kaul keshavkaul

  • India
View GitHub Profile
@keshavkaul
keshavkaul / connect.jsx
Last active Aug 4, 2018
A react redux connect API inspired by `react-redux` library using latest React features.
View connect.jsx
import * as React from 'react';
const StoreContext = React.createContext();
const StoreProvider = StoreContext.Provider;
const StoreConsumer = StoreContext.Consumer;
const isShallowEqual = (objA, objB) => {
const hasOwn = Object.prototype.hasOwnProperty
function is(x, y) {
You can’t perform that action at this time.