v2.5.0
New
-
store.registerModulecan now be called while preserving current state if the module is already registered, by passing a 3rd argument as{ preserveState: true }. Useful in server-side rendering. -
New method:
store.subscribeAction()- similar tostore.subscribe, but for actions instead. -
Namespaced modules can now also register global actions using the following syntax:
const module = { actions: { rootAction: { root: true, handler: () => {} } } }
-
The
createLoggerfunction now also accepts aloggeroption, allowing the user to provide a custom implementation of theconsoleobject to be used when logging.