title: Using dispatched actions
body: <p>I have this on the bottom of my main file:</p>
  
  <pre><code>export default connect(state =&gt; ({
      state: state.firebaseReducer
    }),
    (dispatch) =&gt; ({
      actions: bindActionCreators(firebaseActions, dispatch)
    })
  )(Routing);
  </code></pre>
  
  <p>And this is my reducer that I imported</p>
  
  <pre><code>const initialState = null;
  export function firebaseRef(state = initialState, action) {
    switch (action.type) {
    case 'FIREBASE_REF_SET':
      return action.value;
    default:
      return state;
    }
  }
  </code></pre>
  
  <p>Action:</p>
  
  <pre><code>export function setFirebaseRef(ref) {
    return {
      type: 'FIREBASE_REF_SET',
      value: ref
    };
  }
  </code></pre>
  
  <p>But when I try to do this in my main file:</p>
  
  <pre><code>componentDidMount() {
    state.setFirebaseRef(ref);
  }
  </code></pre>
  
  <p>It says "Can't find variable: state" . Am I calling it the wrong way? I want to be able to call the setFireBaseRef action.</p>