Skip to content

Version 1.3.0 - January 18, 2015

Choose a tag to compare

@jesseskinner jesseskinner released this 19 Jan 04:38
· 75 commits to master since this release

Two big changes here that make things more flexible:

  • State can now be any value, not just objects. If objects are used, they will still be merged via setState, but you can now use anything as your state.
  • Hoverboard no longer uses serializing to copy state. In fact, Hoverboard no longer prevents mutation at all. It's up to you whether to use serialization, Object.assign, or some other immutability library to protect your state by writing a custom getState method. If you want to use the old way Hoverboard did mutation protection, add this getState method to your stores:
var Store = Hoverboard({
    getState: function(state){
        return JSON.parse(JSON.stringify(state));
    }
});

These are the last changes I have planned for a while. Hoverboard is now only 769 bytes minimized and gzipped!