(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name="description" content="live typing indicator"> | |
<script src="https://cdn.firebase.com/js/client/2.3.1/firebase.js"></script> | |
<meta charset="utf-8"> | |
<title>Live Typing Indicator</title> | |
</head> | |
<body> | |
<ul id='typers'> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// Count the each letter occurance in the "text", | |
// the result put into the "stats" object in a form of: | |
// { | |
// a: 10, | |
// c: 13, | |
// ... | |
// } | |
// | |
// NOTE! count letters only, | |
// consider lower case and upper case letter to be the same |
import React, { Component } from 'react' | |
import ReactDOM from 'react-dom' | |
import debounce from 'lodash/debounce' | |
class AutoSizer extends Component { | |
constructor() { | |
super() | |
this.getWidthAndHeight = debounce(this.getWidthAndHeight.bind(this), 200) | |
this.state = { | |
width: 0, |
// @flow | |
import * as React from 'react'; | |
import {asyncComponent} from 'react-async-component'; | |
export const loaderMaker = (bgColor: string = 'transparent') => () => ( | |
<div style={{position: 'absolute', width: '100%', height: '100%', backgroundColor: bgColor}} /> | |
); | |
const MAX_RETRIES = 3; | |
const STARTING_BACKOFF = 500; |
// Copyright 2015 The Freetype-Go Authors. All rights reserved. | |
// Use of this source code is governed by your choice of either the | |
// FreeType License or the GNU General Public License version 2 (or | |
// any later version), both of which can be found in the LICENSE file. | |
// +build example | |
// | |
// This build tag means that "go install github.com/golang/freetype/..." | |
// doesn't install this example program. Use "go run main.go" to run it or "go | |
// install -tags=example" to install it. |