Reputation: 12304
The example on the main Alt page shows how to connect a single store to a React component using @connectToStores
.
I wonder if we can still use @connectToStores
to connect 2 stores to a React component. I suppose the getStores
method will be like this:
static getStores() {
return [TodoStore, TodoStore2];
}
but I don't know how the getPropsFromStores
should be.
Upvotes: 2
Views: 1739
Reputation: 57
If you want to connect 2 stores together for one component, wrap your component in an AltContainer and then reference the props the AltContainer passes to your component.
Upvotes: 1
Reputation: 12304
This question is answered here
https://github.com/goatslacker/alt/issues/420
Upvotes: 2