Skip to content

Instantly share code, notes, and snippets.

module HookTypes = {
type state('a);
type effect;
type t('t);
let addState: (~state: 'state, t('t)) => t(('t, state('state))) =
(~state as _, x) => Obj.magic(x);
let addEffect: t('t) => t(('t, effect)) = Obj.magic;
};
@jchavarri
jchavarri / app.coffee
Created January 18, 2016 23:56 — forked from jemgold/app.coffee
class-based Framer prototypes
# An example with classes building components.
# This stuff is a little fiddly to get set up,
# but once it's working it's great - you can just
# add new instances of the components, and each
# components holds references to all of its
# children. You can set defaults & states for each
# component separately.
#
# (try clicking on the post author, and then on each
# of the comments on a post)