Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View ericelliott's full-sized avatar
💭
https://leanpub.com/composingsoftware

Eric Elliott ericelliott

💭
https://leanpub.com/composingsoftware
View GitHub Profile
@maiermic
maiermic / variance.md
Last active September 26, 2023 16:07
Description of the four kinds of variance: covariance, contravariance, invariance and bivariance.

Variance

The term variance describes how subtyping between higher kinded types is related to subtyping relations of their type arguments.

Higher Kinded Types

A higher kinded type composes type arguments to a new type. I use square bracket notation to define a higher kinded type:

C[T] // The higher kinded type `C` composes type argument `T` to a new type `C[T]`.

The same works with multiple type arguments:

$ node --version
v5.2.0
$ npm ls
most-perf@0.10.0 /home/tylor/code/most/test/perf
├── @reactivex/rxjs@5.0.0-beta.1
├── baconjs@0.7.83
@ohanhi
ohanhi / joy-of-composition.md
Last active February 3, 2021 18:14
The Joy of Composition - Why stateless rendering is pure bliss

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut!

The Joy of Composition

Why stateless rendering is pure bliss

React just got stateless components, meaning that they are in essence pure functions for rendering. Pure functions make it dead simple - even fun - to refactor your views

@paulirish
paulirish / what-forces-layout.md
Last active April 23, 2024 06:51
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@ericelliott
ericelliott / .jshintrc
Last active August 29, 2015 14:15
Idiomatic JavaScript .jshintrc for Isomorphic JavaScript with Node style modules and Browserify
{
"maxerr": 10,
"node": true,
"browser": true,
"typed": true,
"worker": true,
"browserify": true,
"predef": ["define", "require"],
"camelcase": false,
"curly": true,

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@rsperberg
rsperberg / essential-javascript-links.md
Last active October 5, 2022 17:10 — forked from ericelliott/essential-javascript-links.md
A fork that adds descriptions to Eric Elliott’s 142 essential JS links
# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@Flet
Flet / thoughts.md
Created January 8, 2015 07:41
Thoughts on todotasks repo

Creating a new Task Runner Example

README.MD

Every task runner should have a README.MD file with the following sections:

  • Overview
    • Explain the focus/goals of the task runner and include links to resources and tutorials.
@ericelliott
ericelliott / essential-javascript-links.md
Last active April 22, 2024 10:15
Essential JavaScript Links