React native 无法处理错误:`中间件不是函数';在redux中?

React native 无法处理错误:`中间件不是函数';在redux中?,react-native,redux-promise-middleware,React Native,Redux Promise Middleware,我尝试在我的应用程序中使用redux promise中间件,但当我尝试运行我的应用程序时,错误会显示一条错误消息:“中间件不是函数或中间件为空” 我尝试在没有redux async docs中建议的功能的情况下使用中间件,但仍然出现错误。 configureStore.js index.js 从“React”导入React 从“react native”导入{AppRegistry}; 从“./App”导入应用程序; 从“react redux”导入{Provider} 从“./config

我尝试在我的应用程序中使用redux promise中间件,但当我尝试运行我的应用程序时,错误会显示一条错误消息:“中间件不是函数或中间件为空”

我尝试在没有redux async docs中建议的功能的情况下使用中间件,但仍然出现错误。

configureStore.js


index.js


从“React”导入React
从“react native”导入{AppRegistry};
从“./App”导入应用程序;
从“react redux”导入{Provider}
从“./configureStore”导入configureStore
const store=configureStore();
常量ReduxMiddleware=()=>{
}
注册表组件('ReduxMiddleware',()=>ReduxMiddleware);
请任何人告诉我为什么我要面对这个错误。 我是redux的新手。

import promiseMiddleware from 'redux-promise-middleware';

composeStoreWithMiddleware = applyMiddleware(
   promiseMiddleware,
)(createStore);
而不是:允诺人()

(不是大写字母和w/o())

import React from 'react'
import { AppRegistry } from 'react-native';
import App from './App';
import { Provider } from 'react-redux'
import configureStore from './configureStore'

const store = configureStore();

const ReduxMiddleware = () => {
    <Provider store={store}>
        <App />
    </Provider>
}

AppRegistry.registerComponent('ReduxMiddleware', () => ReduxMiddleware);
import promiseMiddleware from 'redux-promise-middleware';

composeStoreWithMiddleware = applyMiddleware(
   promiseMiddleware,
)(createStore);