title: React component not updating event if React/Redux state has changed
body: <p>Okey, after several hours of searching for the solution, i need to post a question about this. </p>
  
  <p>Ive read x amounts of threads and tried  "connecting" the component with state, different promise callbacks, ive tried setTimeout (big nono, i know), ive tried updating on componentDidMount, componentWillMount, componentDidUpdate etc. Ive tried forceUpdate(). In fact, state is uppdated and contains the "productlist" with updated data from Firebase. It seems as though the component renders without this data. </p>
  
  <p>Function fetching data from firebase: </p>
  
  <pre><code>function updateProducts(endpointstring) {
  let initialList = [];
  let productsList = [];
  function getData(endpoint) {
      let productsRef = database.ref('products/' + endpoint);
      return productsRef.once('value').then(function (snapshot) {
          return snapshot.val()
      })
  }
  Promise.all([getData(endpointstring)]).then( (response) =&gt; {
      for(var product in response){
          productsList.push(response[product])
          console.log(productsList)
      }
  })
  return productsList;
  </code></pre>
  
  <p>}</p>
  
  <p>Reducer:</p>
  
  <pre><code>import * as firebase from 'firebase';
  const database = firebase.database();
  
  function updateProducts(endpointstring) {
      let initialList = [];
      let productsList = [];
      function getData(endpoint) {
          let productsRef = database.ref('products/' + endpoint);
          return productsRef.once('value').then(function (snapshot) {
  
              let list = [];
              for(var prod in snapshot.val()){
  
                  list.push(snapshot.val()[prod])
              }
              return list
          })
      }
     var newList = getData('mobiles');
          for(var product in newList){
              productsList.push(newList[product])
              console.log(productsList)
          }
  
      return getData('mobiles');;
  }
  
  
  const mobilesReducer = (state = {
      view: "everything",
      filteredValue: "",
      productInFocus: 0,
      products: updateProducts('mobiles'),
      imgLoads: [],
      loadedOnce: false,
      priceRange: {min: 0, max: 3500},
      minPrice: 0,
      maxPrice: 3500,
      sort: "popular"
  
  }, action) =&gt; {
  
      let newState = {...state};
  
      switch(action.type){
  
          case 'COMPONENT_DID_MOUNT':
              console.log(action.payload)
              action.payload.componentName === 'mobiles' ? newState = {...newState, products: action.payload.productList} : null;
              return newState;
  </code></pre>
  
  <p>Anybody has a different take in this? </p>
  
  <p>Thanks.</p>