title: How to pass props to reducer? ReactJs and Redux
body: <p>I'm struggling with react-redux thing quite a lot of hours. I want to show to user <code>&lt;Alert /&gt;</code> when <code>isVisible</code> value is true. I'm still don't understand well architecture of redux. So, I'm trying to pass value to reducer but it doesn't work. What I'm doing wrong? </p>
  
  <p>Alert component:</p>
  
  <pre><code>export default () =&gt; {
          return (
              &lt;div className="alert alert-warning"&gt;
                  &lt;strong&gt;Warning!&lt;/strong&gt; Indicates a warning that might need attention.
              &lt;/div&gt;
          );
      };
  </code></pre>
  
  <p>Weather container:</p>
  
  <pre><code>    renderWeather(cityData) {
          const name = cityData.city.name;
          const temps = _.map(cityData.list.map(weather =&gt; weather.main.temp), (temp) =&gt; temp - 273);
  
      return (
          &lt;tr key={name}&gt;
              &lt;td&gt;&lt;Chart data={temps} color="orange" units="C" /&gt;&lt;/td&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      )
  }
      render() {
          return (
              &lt;div&gt;
                  {this.props.isVisible ? null : &lt;Alert /&gt; }
                  &lt;table className="table table-hover"&gt;
                      &lt;thead&gt;
                          &lt;tr&gt;
                              &lt;th&gt;City&lt;/th&gt;
                              &lt;th&gt;Temperature (C)&lt;/th&gt;
                          &lt;/tr&gt;
                      &lt;/thead&gt;
                      &lt;tbody&gt;
                          {this.props.weather.map(this.renderWeather)}
                      &lt;/tbody&gt;
                  &lt;/table&gt;
              &lt;/div&gt;
          )
      }
  }
  
  function mapStateToProps({ weather, isVisible }) {
      return { weather, isVisible };
  }
  
  export default connect(mapStateToProps)(WeatherList);
  </code></pre>
  
  <p>Index reducer:</p>
  
  <pre><code>const rootReducer = combineReducers({
    weather: WeatherReducer,
    isVisible: WeatherReducer
  });
  
  export default rootReducer;
  </code></pre>
  
  <p>Reducer:</p>
  
  <pre><code>export default function (state = [], action) {
      switch (action.type) {
      case FETCH_WEATHER:
          return [...state, action.payload];
      case FETCH_WEATHER_ERROR: 
          return {state, isVisible: false}
      }
      return state;
  }
  </code></pre>
  
  <p>Action:</p>
  
  <pre><code>export function fetchWeather (city) {
      const url = `${ROOT_URL}&amp;q=${city}`;
  
      return (dispatch) =&gt; {
          axios.get(url);
          .then(({data}) =&gt; {
              dispatch({type: FETCH_WEATHER, payload: data});
          })
          .catch((error) =&gt; { 
              dispatch({type: FETCH_WEATHER_ERROR, payload: error});
          });
      };
  }
  </code></pre>