Skip to content

Instantly share code, notes, and snippets.

Stephen Parish stephenparish

Block or report user

Report or block stephenparish

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
stephenparish / mini-redux.js
Last active Dec 12, 2019 — forked from MarcoWorms/mini-redux.js
Redux in a nutshell
View mini-redux.js
function createStore (reducers) {
let state = reducers()
const subscribers = [];
const store = {
dispatch: (action) => {
state = reducers(state, action);
subscribers.forEach((subscriber) => subscriber());
getState: () => {
return state
You can’t perform that action at this time.