Adding a way to set the propTypes of StoreConnection component returned by connectToStore.
I have a real use case for this: I have an Article component which takes an article object as props and I'm using connectToStore to connect it to an ArticleStore. The StoreConnection component returned from connectToStore takes an articleID as its props and uses that to get the article object from store and passes it down to the stateless Article component.
Before this, I can't require this StoreConnection to have an articleID props. Now with connectorPropTypes in Spec, it's possible.
…tToStore
Adding a way to set the
propTypes
ofStoreConnection
component returned byconnectToStore
.I have a real use case for this: I have an
Article
component which takes an article object as props and I'm usingconnectToStore
to connect it to anArticleStore
. TheStoreConnection
component returned fromconnectToStore
takes anarticleID
as its props and uses that to get the article object from store and passes it down to the statelessArticle
component.Before this, I can't require this
StoreConnection
to have anarticleID
props. Now withconnectorPropTypes
inSpec
, it's possible.