- Changed store's event signature, from now on store events will be returned with signature
event, error, options. Options will always includestorekey that has the related storeId as value. This change will make listening changes much easier as you can now re-render by just listeningexpireinstead of adding separateexpire:storeIdlisteners for all stores. Events are still dispatched with previous signatureevent:storeId, error, extrabut that format will be removed in the future.
- Fixed array merging in store's fetch
- Dropped immstruct, Cerebellum's store now uses vanilla Immutable.js
- Added
identifieroption, by default Store assumes thatidfield defines the identity of model. It's currently only used in Store's fetch when merging changes. - Store's fetch now properly merges Immutable.Lists, only changed items will be re-rendered when using pure render mixin with React.
- Client's render now has a matching signature to server's render, they both call the given render method with document, options & params/query.
- Store's dispatch now returns promise, allows for easy error handling in view components
- Store's
triggeris now deprecated, usedispatchinstead.
- You can now define entry .html files per route pattern, e.g. /admin can use admin.html
- Store's state is now held in immstruct
- Store's autoToJSON option was deprecated, all stores are now automatically converted to JSON for immstruct
- Store's autoClearCaches option is now enabled by default
- Store now marks caches as stale instead of immediately expiring them
- Store now performs optimistic creates, updates & deletes and automatically rolls back in case of API errors
- Store now tracks ongoing fetch requests to prevent multiple identical API calls
- Collection & model are now exported as standalone modules
- Server's fallback error handler now prints the stack trace
- Now written in ES6, build with
npm run build& watch changes withnpm run watch - Fixed client side tests
- Now uses vertebrae instead of exoskeleton.
- Moved main modules from lib/ to root. It's now easier to
require('cerebellum/server')
- Easier cache clearing
- Added relatedCaches
- Added query string as last argument for route handlers
- Route context can also be a promise that resolves with object