title: Context in "stateless" component?
body: <p>I have the following code in a component and I would like a stateless component to access this part of code:</p>
  
  <p>Main component:</p>
  
  <pre><code>function createApp(store, communityIds) {
  const App = React.createClass({
  
      childContextTypes: {
          localizedString: React.PropTypes.func,
      },
  
      getChildContext: function() {
          return {
              localizedString: function(key, fallback) {
                  return getKey(key, fallback);
              },
          };
      },
  
      render: function() {
          return (
              &lt;Provider store={store}&gt;
                  &lt;Client communityIds={communityIds}/&gt;
              &lt;/Provider&gt;
          );
      },
  });
  
  return &lt;App/&gt;;
  }
  </code></pre>
  
  <p>Stateless:</p>
  
  <pre><code>export default () =&gt; (dispatch, getState) =&gt; {
      const state = getState();
  
      const token = state.user.get('token');
  
      if (!token) {
          throw new Error('test'); // this.context.localizedString does not work
      }
  }
  </code></pre>