Skip to content

Instantly share code, notes, and snippets.

View denistakeda's full-sized avatar

Denis Krivosheev denistakeda

  • Rostov-on-Don, Russia
View GitHub Profile
/**
* This type should be used to generate the Algebraic Data Types
* in typescript.
* */
export type Variant<Kind, Shape> = Readonly<{ kind: Kind } & Shape>
// eslint-disable-next-line @typescript-eslint/ban-types
export type EmptyVariant<Kind> = Variant<Kind, {}>
/**
(ns overweight.core)
(def animals
[{:type :cat
:name "Tom"
:weight 3}
{:type :dog
:breed :boxer
:weight 12}
{:type :cat
(ns overweight.core)
(def animals
[{:type :cat
:name "Tom"
:weight 3}
{:type :dog
:breed :boxer
:weight 12}
{:type :cat
@denistakeda
denistakeda / dashboard.js
Created October 16, 2016 07:21
React in functional style
import React, { PropTypes } from "react";
import IPropTypes from "react-immutable-proptypes";
import composeEnhances from "recompose/compose";
import setDisplayName from "recompose/setDisplayName";
import setPropTypes from "recompose/setPropTypes";
import onlyUpdateForPropTypes from "recompose/onlyUpdateForPropTypes";
import { connect } from "react-redux";