kjda / ReactFlux

A library implementing React-Flux data flow design pattern + Code Generation
MIT License
66 stars 12 forks source link

Add ability to specify a mixins array for stores #5

Closed lelandrichardson closed 9 years ago

lelandrichardson commented 9 years ago

Adding logic to import mixins through a mixins array, similar to react components.

This was discussed in more detail here

lelandrichardson commented 9 years ago

I just thought of something for this. It's possible that a mixin could require specific behavior for certain lifecycle events such as getInitialState and storeDidMount.

I think if multiple mixins are used that implement these lifecycle events, it should be handled properly... (rather than just overriding their own implementations, as this version would do currently)

what do you think?

I don't have time to implement this tonight, but could push an update tomorrow.

lelandrichardson commented 9 years ago

well, I lied. I did have time to implement this...

Let me know what you think!

lelandrichardson commented 9 years ago

@kjda Let me know if there's anything you want me to change with this to get it merged. Thanks.

kjda commented 9 years ago

thanks man! great :)