LeanKit-Labs / lux.js

Flux-based architecture for using ReactJS at LeanKit
MIT License
114 stars 14 forks source link

Fixed getState to always get the same arguments #86

Closed dcneiner closed 8 years ago

dcneiner commented 8 years ago

There is no way to current get the props from the component into the getState method on the first invocation. Since the onChange version of getState includes both props and a payload similar to { store1: true, store2: false } I opted to pass that through on the first getState as well – it sets every store to true since this is the first request for data for that component. If it should do something differently, please let me know.

Also fixed a minor react warning in the action mapping tests where a prop was identified as React.PropTypes.string but was getting passed a function.