title: Initializers in React.js?
body: <p>I am using <code>react 0.13.1</code> in a <code>rails 4.2.1</code> application with <code>react-rails</code> and <code>browserify-rails</code>.  I am not doing a single page application, but instead adding <code>react</code> components on rendered pages and using the <code>rails</code> routing system.</p>
  
  <p>When I load a page, I want to initialize a few things, but I'm not sure where this code should go.  Does <code>react</code> have a initializer function that it always calls before rendering components or does it always render the first component first such that I can just add initializer code to the first component?</p>
  
  <p>How would I go about putting <code>react</code> initializer code in my multi page <code>rails</code> application? (should work for client or server rendered <code>react</code> code)</p>
  
  <p>Note: Assume only <code>react</code> and plain <code>javascript</code> is being used.</p>
  
  <p>Edit: not asking about initializing on each component, but rather initializing code after page load, but before react starts going through and rendering any components.</p>