This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ReactDom = require("react-dom"); | |
var Redux = require("redux"); | |
var ReactRouter = require("react-router"); | |
var ReactRedux = require("react-redux"); | |
var ExtractTextPlugin = require("extract-text-webpack-plugin"); | |
var window={} | |
var getElementsByTagName = function (b) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Generic helper function that takes a main() (the top-level component) | |
// and wraps it with Stanga logic | |
function wrapWithStanga(main, initialState) { | |
return function (sources) { | |
const modProxy$ = new Subject(); | |
const modelSource = Model(initialState)(modProxy$); | |
sources.model = modelSource; | |
const sinks = main(sources); | |
sinks.model.subscribe(modProxy$); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
I have a queue that clients submit tasks to, this backend worker consumes them | |
firebaseDriver: provides a function that generates a one-element observable of a firebase location | |
queueConsumerDriver: provides a source of all incoming requests, consumes a sink that takes responses | |
knows via the uid in the response what channel to send it back on | |
*/ | |
import {makeFirebaseDriver, makeQueueConsumerDriver} from 'cyclic-fire' |