title: Expected the reducer to be a function
body: <p>I create a new react-native project and write a redux demo.IOS Simulator show the error 'Expected the reducer to be a function'.I tried to solve the problem from the preview answers,but it doesn't work</p>
  
  <p>index.ios.js</p>
  
  <pre><code>import React, {Component} from 'react';
  import {AppRegistry, StyleSheet, Text, View} from 'react-native';
  
  import {createStore} from 'redux';
  import {Provider} from 'react-redux';
  import {reducers} from './src/reducer';
  import {App} from './src/App';
  
  const store = createStore(reducers)
  
  export default class rnredux extends Component {
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;Provider store ={store}&gt;
            &lt;App/&gt;
          &lt;/Provider&gt;
        &lt;/View&gt;
  
      );
    }
  }
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      justifyContent: 'center',
      alignItems: 'center',
      backgroundColor: '#F5FCFF'
    },
  });
  
  AppRegistry.registerComponent('rnredux', () =&gt; rnredux);
  </code></pre>
  
  <p>App.js</p>
  
  <pre><code>import {connect} from 'react-redux';
  import MyComponent from './myComponent';
  
  function mapStateToProps(state) {
      return {text: state.text, name: state.name}
  }
  
  function mapDispatchToProps(dispatch) {
      return {
          onChange: (e) =&gt; dispatch({type: 'change', payload: e.target.value})
      }
  }
  
  const App = connect(
      mapStateToProps,
      mapDispatchToProps
  )(MyComponent);
  
  export default App;
  </code></pre>
  
  <p>myComponent.js</p>
  
  <pre><code>import React,{Component} from 'react';
  import {Text,TextInput} from 'react-native';
  
  export default class myComponent extends Component{
      render(){
          &lt;View&gt;
              &lt;Text&gt;{this.props.text}&lt;/Text&gt;
              &lt;TextInput defaultValue = {this.props.name} onChangeText = {this.props.onChange}&gt;&lt;/TextInput&gt;
          &lt;/View&gt;
      }
  }
  </code></pre>
  
  <p>reducer.js</p>
  
  <pre><code>import {combineReducers} from 'redux';
  
  const reducerAction = (state = {
    text: '你好，访问者',
    name: '访问者'
  }, action) =&gt; {
    switch (action.type) {
      case 'change':
        return {
          name: action.payload,
          text: '你好，' + action.payload
        };
      default:
        return state;
    }
  }
  
  const reducers = combineReducers({
      reducerAction
  })
  
  export default reducers;
  </code></pre>