text: import React from 'react';
  import ReactDOM from 'react-dom';
  import { Provider } from 'react-redux';
  import { createStore, applyMiddleware } from 'redux';
  
  //browserhistory tells the Router how to keep track of the current url
  import{ Router, Route, browserHistory } from 'react-router';
  
  //this is the higher order component
  import requireAuth from './components/require_authentication';
  
  import App from './components/app';
  import Resources from './components/resources';
  import reducers from './reducers';
  
  const createStoreWithMiddleware = applyMiddleware()(createStore);
  
  ReactDOM.render(
    <Provider store={createStoreWithMiddleware(reducers)}>
      <Router history = { browserHistory }>
        <Route path = '/' component = { App }>
          <Route path = 'resources' component = { requireAuth(Resources) } />
        </Route>
      </Router>
    </Provider>
    , document.querySelector('.container'));
  