You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I recently had to track down a fairly cryptic error:
this.getFlux(...).store is not a function
Short story, this error was the result of accidentally passing a promise that resolves to a Fluxxor.Flux instance instead of an actual instance.
I think Fluxxor should do a little more to ensure it is actually working with Fluxxor.Flux instances. Namely instead of using React.PropTypes.object for flux I think it should explicitly make sure that it is a Flux object.
Depending on your stance on cross-realm/multiple-instance handling this can either be done by using React.PropTypes.instanceOf or using a React.PropTypes.shape that looks for the telltale parts of a Flux object like store, stores, etc...
Likewise I think the FluxMixin should also declare propTypes for the props it uses.
The text was updated successfully, but these errors were encountered:
I recently had to track down a fairly cryptic error:
Short story, this error was the result of accidentally passing a promise that resolves to a
Fluxxor.Flux
instance instead of an actual instance.I think Fluxxor should do a little more to ensure it is actually working with
Fluxxor.Flux
instances. Namely instead of usingReact.PropTypes.object
forflux
I think it should explicitly make sure that it is aFlux
object.Depending on your stance on cross-realm/multiple-instance handling this can either be done by using
React.PropTypes.instanceOf
or using aReact.PropTypes.shape
that looks for the telltale parts of aFlux
object likestore
,stores
, etc...Likewise I think the
FluxMixin
should also declarepropTypes
for the props it uses.The text was updated successfully, but these errors were encountered: