Skip to content

v2.5.0

Compare
Choose a tag to compare
@yyx990803 yyx990803 released this 11 Oct 19:06
· 488 commits to main since this release

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 to store.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 a logger option, allowing the user to provide a custom implementation of the console object to be used when logging.