Skip to content

Instantly share code, notes, and snippets.

View taras's full-sized avatar

Taras Mankovski taras

View GitHub Profile
@taras
taras / react-event-pipeline.jsx
Created August 6, 2018 17:18 — forked from cowboyd/react-event-pipeline.jsx
Hypothetical React Event Pipeline
import { pipe as $, string, preventDefault, blockOn } from 'react-event-pipeline'
function onSubmit(form) {
return $(preventDefault, blockOn(() => form.isSubmittable), onSave(form.serialized));
}
export default function Settings({ flares, knotsPerFlare, onSave }) {
return (
<State type={Form} value={{ flares, knotsPerFlare }}>
{form => {
@taras
taras / task-lifting.js
Created July 19, 2019 17:41 — forked from cowboyd/task-lifting.js
What is the relationship between tasks and execution trees?
import { execute, call } from 'effection';
// One of the things that struck me was that when I was doing the
// implementation for the `enqueue` function in the task constraining
// functions
// (https://gist.github.com/cowboyd/19122da0c59c674cdea86cf6d70e9c75),
// was the eventual form it took.
//
// Like the other task constructors, it returned a function. Let's