Skip to content

Instantly share code, notes, and snippets.

@ograycode
ograycode / simpleStoreExample.js
Created May 17, 2019 12:40
A super simple implementation of a psuedo-flux pattern.
import React, { Component, Fragment } from 'react';
const connect = (Wrapped, store) => {
return class extends Component {
constructor(props) {
super(props);
this.state = { store };
}
dispatch(name, data) {