Skip to content

Instantly share code, notes, and snippets.

function rootReducer(state, action) {
return {
part1: part1Reducer(state.part1, action),
part2: part2Reducer(state.part2, action)
}
}
function part1Reducer(state, action) {
return {
part1A: part1AReducer(state.A, action),
function* watchEvents(): any {
const initial = yield call(ExternalApi.getCurrent);
yield put(receiveEvent(initial);
const chan = yield call(setupEvents);
while (true) {
const event = yield take(chan);
yield put(receiveEvent(event));
}
@camwest
camwest / 1-myapp.jsx
Last active April 20, 2016 22:11
redux with events
<div>
<MyCollection name="ONE" />
<MyCollection name="TWO" />
</div>
// define main angular module
var app = angular.module('app-module', []);
// inject $provide into the application config
app.config(['$provide', function($provide) {
// provide the LOGIN_DATA as a constant to angular
$provide.constant('LOGIN_DATA', window.LOGIN_DATA)
}]);
app.controller('MyCtrl', function(LOGIN_DATA) {
$(function () {
var chart;
$(document).ready(function() {
chart = new Highcharts.Chart({
chart: {
renderTo: 'container',
type: 'area'
},
title: {
text: 'Weekly Cohorts: States'
{
"name": "kera-proxy",
"version": "0.0.1",
"author": "Kera Software Inc <[email protected]>",
"private": true,
"dependencies": {
"faux": "https://github_username:[email protected]/kera-inc/faux.git",
"express": "2.5.x",
"directory-tree-watcher": "0.0.5",
"coffee-script": "1.3.1"
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
</head>
<body>
<style>
#outer {
position:relative;
[~] rake db:create:all
development:
adapter: postgresql
encoding: unicode
database: my_rails_app_development
pool: 5
username: my_rails_app
test:
adapter: postgresql
encoding: unicode
database: my_rails_app_test
[~] bundle install