     #@setState(active: !@state.active)
     #@props.timerSwitch.onNext(@state.active)
 
-initUI = (eventSources) ->
+initUI = (eventSubjects) ->
   rootComponent = R.div {},
-    RequestsWidget(events: eventSources.requests),
-    MouseDragWidget(events: eventSources.mouseDrags),
-    TimerWidget(events: eventSources.timer, timerSwitch: eventSources.timerSwitch)
+    RequestsWidget(events: eventSubjects.requests),
+    MouseDragWidget(events: eventSubjects.mouseDrags),
+    TimerWidget(events: eventSubjects.timer, timerSwitch: eventSubjects.timerSwitch)
   React.renderComponent(rootComponent, document.getElementById('app'))
 
 

  dx: 0
  dy: 0

demos.mouseDrags = (eventSources) ->
  dragsSource = mouseDrags(document)
  dragsSource.subscribe (drag) -> eventSources.mouseDrags.onNext(drag)
  dragsSource.subscribe(logAllObserver('drags'))
  mouseUp.subscribe () -> eventSources.mouseDrags.onNext(mouseDragResetEv)

demos.timer = (eventSources) ->
  ticks = Observable
    .interval(1000) # ms
    .timeInterval()
    .pausable(eventSources.timerSwitch)
    .pluck("value")
  ticks.subscribe((tick) -> eventSources.timer.onNext(tick))
  ticks.subscribe(logAllObserver('timer'))

################################################################################

      d = _.mapValues(d, (v) -> v.toFixed(2))
      d.count = Math.round(d.count)
      d)
    .subscribe((e) -> eventSubjects.requests.onNext(e))

  observeWebSocket(url("responseTimes"))
    .sample(500)
    .subscribe((e) -> eventSubjects.responseTimes.onNext(e))

################################################################################
# additional Observable event sources demos included in presentation
