New
-
store.registerModule
can 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
createLogger
function now also accepts alogger
option, allowing the user to provide a custom implementation of theconsole
object to be used when logging.