所以为2天一直试图让Redux与NativeScript和角2和没有运气工作...所有在浏览器中正常工作,但不是在NativeScript中......并找不到使用终极版与NS的人在整个网络上简单的例子...:/NativeScript与REDX ...得到错误
这是错误
JS: at /data/data/org.nativescript.groceries/files/app/Lib.js:23:62
JS: at NgModuleInjector.Object.defineProperty.get (AppModule.ngfactory.js:210:61)
JS: at NgModuleInjector.AppModuleInjector.getInternal (AppModule.ngfactory.js:284:48)
JS: at NgModuleInjector.get (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:7135:31)
JS: at ElementInjector.get (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:9208:52)
JS: at ReflectiveInjector_._getByKeyDefault (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:3297:28)
JS: at ReflectiveInjector_._getByKey (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:3263:29)
JS: at ReflectiveInjector_.get (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:3072:25)
JS: at DebugAppView._View_LoginComponent_Host0.createInternal (LoginComponent_Host.ngfactory.js:16:189)
JS: at DebugAppView.AppView.create (/data/data/org.nativescript.groceries/files/app/tns_modules/@angular/core/bundles/core.umd.js:9323:25)
JS: Error: Uncaught (in promise): Error: Error in ./LoginComponent class LoginComponent_Host - inline template:0:0 caused by: thunkMiddleware is not defined
不是非常丰富,我知道。 我想NativeScript的人会有一个简单的例子,但没有这样的运气。
我唯一可以工作的只是一个减速器的redux商店。 但只要我尝试combineReducers或添加中间件,这一切爆...
不知道为什么
所有香草Redux的东西:
const middlewareEnhancer = applyMiddleware(<any>thunkMiddleware);
const enhancers = compose(middlewareEnhancer);
const createStoreWithEnhancers = enhancers(createStore);
const reduxAppStore = createStoreWithEnhancers(reducerList);
return reduxAppStore;
我欢迎任何的帮助,但在这一点上,没有任何堆栈跟踪信息,我可以工作,我觉得这是一个失败的事业......
问候
肖恩
感谢回答,我会回答为好,但请明白,你所提供的NGRX一个例子,而不是终极版......不一样的东西。 .. – born2net