Skip to content

Instantly share code, notes, and snippets.


Illia Kolodiazhnyi iktash

  • Dublin, Ireland
View GitHub Profile
iktash / functionalDispatch.js
Created Oct 22, 2018
A tiny example of an application state management done in a fully functional manner
View functionalDispatch.js
const getDispatch = (initialState, render) => {
let stateContainer = Container.of(initialState);
const updateState = action => new IO(() => {
stateContainer =;
return stateContainer;
return action => {
const sideEffects = pipe(
View GithubApiPush.js
//Uses the library under the hood and exposes it as `gh` property
function GithubAPI(auth) {
let repo;
let filesToCommit = [];
let currentBranch = {};
let newCommit = {};
//the underlying library for making requests
let gh = new GitHub(auth);
You can’t perform that action at this time.