0

I appear to be having difficulty comprehending the documentation on handling multiple stores. This is in my APP component ...

  static getStores() {
    return [InventoryStore, CompanyInfoStore];
  }

   static getPropsFromStores() {
     return {
       ...InventoryStore.getState(),
       ...CompanyInfoStore.getState()
     };
   }

  componentDidMount() {
    const clientId = this.state.clientId;
    InventoryActions.getAll(clientId);
    CompanyInfoActions.getAll(clientId);
  }

InventoryActions is not being 'hit' and the only items in my props.items are company info.

Anyone know how to correct this?

Many Thanks!

1 Answers1

0

I had the same issue. Maybe it will help you the solution that I made. I'm not joining properties from stores, I'm using separate for each one of them.

   static getPropsFromStores() {
     return {
       inventory: InventoryStore.getState(),
       company: CompanyInfoStore.getState()
     };
   }

Hope it will help you.

Michael Czolko
  • 2,698
  • 2
  • 15
  • 25