import 'todomvc-common/base.css';
import 'todomvc-app-css/index.css';
import './styles.css';
import 'file?name=[name].[ext]!./index.html';

import React from 'react';
import ReactDOM from 'react-dom';
import Controller from 'cerebral';
import Model from 'cerebral-model-baobab';
import Http from 'cerebral-module-http';
import {Container} from 'cerebral-view-react';

import App from './modules/App/components/App';
import AppModule from './modules/App';

import Refs from './modules/Refs';
import Devtools from 'cerebral-module-devtools';
import Router from 'cerebral-module-router';

const controller = Controller(Model({}));

controller.addModules({
  app: AppModule(),

  refs: Refs(),
  http: Http({
    baseUrl: '/api',
  }),
  devtools: Devtools(),
  router: Router({
    '/': 'app.footer.filterClicked',
  }, {
    onlyHash: true,
    mapper: {query: true},
  }),
});

// RENDER
ReactDOM.render(
  <Container controller={controller}>
    <App />
  </Container>, document.querySelector('#app'));

import 'todomvc-common/base.css';
import 'todomvc-app-css/index.css';
import './styles.css';
import 'file?name=[name].[ext]!./index.html';

import React from 'react';
import ReactDOM from 'react-dom';
import Controller from 'cerebral';
import Model from 'cerebral-model-baobab';
import Http from 'cerebral-module-http';
import {Container} from 'cerebral-view-react';

import App from './modules/App/components/App';
import AppModule from './modules/App';

import Refs from './modules/Refs';
import Devtools from 'cerebral-module-devtools';
import Router from 'cerebral-module-router';

const controller = Controller(Model({}));

controller.addModules({
  app: AppModule(),

  refs: Refs(),
  http: Http(),
  devtools: Devtools(),
  router: Router({
    '/': 'app.footer.filterClicked',
  }, {
    mapper: {query: true},
  }),
});

// RENDER
ReactDOM.render(
  <Container controller={controller}>
    <App />
  </Container>, document.querySelector('#app'));

Remove Http() baseURL and Router() onlyHash arguments
Remove Http() baseURL and Router() onlyHash arguments
