This repository was archived by the owner on Feb 19, 2022. It is now read-only.
Releases: FormidableLabs/biff
Releases · FormidableLabs/biff
Release list
Adds 0.14 compatibility
Adds 0.14 compatibility
Thanks @iheanyi
0.1.6
- Adds 'event' dependency for non-node environments (react-native)
- Bumps simple-console to 0.1.1 to fix #8
- Removes max listeners warning
0.1.5
0.1.4
0.1.4 Adds a new feature where a composition component is added to the base Biff object in order to attach Biff Stores to components without using mixins. This component is used as shown below:
import Flux from '../dispatcher/dispatcher';
import TodoStore from '../stores/TodoStore';
let App = React.createClass({
...
});
App = Flux.connect(App, [TodoStore], props => ({
todos: TodoStore.getTodos(),
pending: TodoStore.getPending(),
errors: TodoStore.getErrors()
}));
export default App;Bug Fixes
0.1.3 fixes:
- Fixes issue where data isn't passed to component mixins
- Fixes issue where errors weren't cleared
0.1.3 features:
- allows data to be passed through emitChange now as well
0.1.0
Breaking Changes
Action Creator syntax now requires explicit dispatches, see example below:
// OLD WAY
biff.createActions({
myAction: function(arg1){
return {
actionType: 'MY_ACTION',
prop1: arg1
}
}
});
// NEW WAY
biff.createActions({
myAction: function(arg1){
this.dispatch({
actionType: 'MY_ACTION',
prop1: arg1
});
}
});New Features
Stores
Stores in Biff now have store state helpers. Each store object has a _pending property and an _errors array. These are exposed via the following getters and setters:
// Inside components, etc...
MyStore.getPending() // Returns _pending property
MyStore.getErrors() // Returns _errors array
// Inside a store's payload callback
this._setPending(value) // Sets the _pending property
this._setError(error) // Pushes an error onto the _errors array
this._clearErrors() // Clears the store's _errors arrayIn addition to stores being able to store errors, they can also emit errors back to the component using the emitChange method. Components can respond to this event using the storeError method.
// In a store's payload callback
if(error) {
this.emitError(error);
}
// In a component
mixins: [MyStore.mixin],
storeError: function (error) {
console.log(error);
}