<commit_before>import BrowserHistory from 'react-router/lib/BrowserHistory';
import debugFactory from 'debug';
import { Cat } from 'thundercats';

import { app$ } from '../common/app';

const debug = debugFactory('fcc:client');
const DOMContianer = document.getElemenetById('#fCC');
const fcc = new Cat();

// returns an observable
app$(BrowserHistory)
  .flatMap(app => {
    return fcc.render(app, DOMContianer);
  })
  .subscribe(
    function() {
      debug('react rendered');
    },
    function(err) {
      debug('an error has occured', err.stack);
    }
  );
<commit_msg>various fixed to client rendering<commit_after>import Rx from 'rx';
import React from 'react';
import { Router } from 'react-router';
import { history } from 'react-router/lib/BrowserHistory';
import debugFactory from 'debug';
import { Cat } from 'thundercats';

import { app$ } from '../common/app';

const debug = debugFactory('fcc:client');
const DOMContianer = document.getElementById('fcc');
const fcc = new Cat();

Rx.longStackSupport = !!debug.enabled;

// returns an observable
app$(history)
  .flatMap(([ initialState ]) => {
    return fcc.render(React.createElement(Router, initialState), DOMContianer);
  })
  .subscribe(
    () => {
      debug('react rendered');
    },
    err => {
      debug('an error has occured', err.stack);
    },
    () => {
      debug('react closed subscription');
    }
  );

{'fraction_non_alphanumeric': 0.15533285612025768, 'fraction_numerical': 0.0, 'mean_word_length': 3.837370242214533, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2796505', 'n_tokens_mistral': 433, 'n_tokens_neox': 426, 'n_words': 110}