(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.
(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.
In my proposed lightning talk for the Reactive Conference, I'll create Conway's Game of Life in ClojureScript, and I'll do it in five minutes. I'll use an interactive programming workflow enabled by Figwheel. Each piece will be added into the running application without reloading the page.
If you want to see a little cellular lifeform spawn out of nothing into an running web browser window, I'd appreciate it if you starred this Gist!
Cheers,
(@teropa)
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!
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
module DragTable exposing (..) | |
import Html exposing (..) | |
import Html.Attributes exposing (..) | |
import Html.Events exposing (..) | |
import Json.Decode as Json exposing (Decoder, Value) | |
import Dict exposing (Dict) | |
import List as L exposing (drop, take) | |
import Tuple |
module Main exposing (..) | |
import Css.File | |
import MyCss | |
import Html exposing (div, text, node) | |
import Html.Attributes exposing (id, class) | |
css = | |
Css.File.compile [ MyCss.css ] |
autoload -U colors && colors | |
autoload -Uz vcs_info | |
zstyle ':vcs_info:*' stagedstr '%F{green}•' | |
zstyle ':vcs_info:*' unstagedstr '%F{yellow}•' | |
zstyle ':vcs_info:*' check-for-changes true | |
zstyle ':vcs_info:*' enable git svn | |
theme_precmd () { | |
if [[ -z $(git ls-files --other --exclude-standard 2> /dev/null) ]] { |
// paste this to chrome console on anybody's twitter page | |
// and it'll turn into an instant presentation :) | |
(function TweetPresent() { | |
const presenter = $(`<div id="tpd" style=" position: fixed; top: 0; left: 0; height: 100vh; width: 100vw; padding: 10vh 10vw; box-sizing: border-box; background-color: white; font-size: 5vw; text-align: center; z-index: 9999; display: flex; align-items: center; justify-content: center;"></div>`); | |
const tweets = $$(`div.tweet p.js-tweet-text`) | |
.map(el => el.innerHTML) | |
.map(t => ({t, s: Math.random()})) | |
.sort((a, b) => a.s > b.s ? -1 : 1) | |
.map(c => c.t); |