我有这个App.js:
angular2-template-loader
当我尝试从我的某个屏幕(render() {
const hydrate = create({
storage: AsyncStorage
});
hydrate('playerStore', stores.playerStore);
hydrate('settingStore', stores.settingStore);
// .then(
// // () => console.warn('some hydrated')
// );
console.warn("stores: " + JSON.stringify(stores));
return <Provider {...stores} >
<AppDrawer />
</Provider>;
}
)注入商店时,它会返回此错误:
home
这是我的injector: Store 'x' is not available! Make sure it is provided by some Provider
代码:
AppDrawer
这是我的@inject(["userStore", "listStore"])
@observer
export default class Home extends Component {...
:
/store/index.js
你可以指导我解决这个问题吗?