title: How to implement componentWillMount in a Walmart electrode react app?
body: <p>I'm trying to get started with Walamart's electrode react app framework and not sure how to add behavior for when the application mounts.  I want to setup app authentication using auth0.lock and wish to implement initializing it in the app <code>componentDidMount</code> function.</p>
  
  <p><a href="http://www.electrode.io/docs/whats_inside.html" rel="nofollow noreferrer">http://www.electrode.io/docs/whats_inside.html</a></p>
  
  <p>How can I add it to the app.jsx file?  Is that the right place to do so?  Is window.webappStart expecting a react component to be returned?</p>
  
  <pre><code>//
  // This is the client side entry point for the React app.
  //
  
  import React from 'react';
  import { render } from 'react-dom';
  import { Router } from 'react-router';
  import { createStore } from 'redux';
  import { Provider } from 'react-redux';
  import { routes } from './routes';
  import rootReducer from './reducers';
  import './styles/base.css';
  
  //
  // Add the client app start up code to a function as window.webappStart.
  // The webapp's full HTML will check and call it once the js-content
  // DOM is created.
  //
  
  window.webappStart = () =&gt; {
    const initialState = window.__PRELOADED_STATE__;
    const store = createStore(rootReducer, initialState);
    render(
      &lt;Provider store={store}&gt;
        &lt;Router&gt;{routes}&lt;/Router&gt;
      &lt;/Provider&gt;,
      document.querySelector('.js-content')
    );
  };
  </code></pre>