OVERMIND
v23
v23
  • Overmind
  • Introduction
  • Quickstart
  • How to learn
  • Videos
  • FAQ
  • Core
    • Devtools
    • Configuration
    • State
    • Actions
    • Effects
    • Operators
    • Statecharts
    • Server Side Rendering
    • Typescript
  • views
    • React
    • Angular
    • Vue
  • Addons
    • GraphQL
  • Guides
    • Connecting components
    • Connecting to React Native
    • Managing lists
    • State first routing
    • Move to Typescript
    • Testing
  • API
    • action
    • addFlushListener
    • addMutationListener
    • createOvermind
    • createOvermindMock
    • createOvermindSSR
    • derive
    • effects
    • events
    • json
    • lazy
    • merge
    • namespaced
    • onInitialize
    • operators
    • reaction
    • rehydrate
    • statecharts
Powered by GitBook
On this page
  1. API

addFlushListener

The addMutationListener triggers whenever there is a mutation. The addFlushListener triggers whenever Overmind tells components to render again. It can have multiple mutations related to it.

import { OnInitialize } from 'overmind'

const onInitialize: OnInitialize = async ({ state, effects }, overmind) => {
  overmind.addFlushListener(effects.history.addMutations)
}

export default onInitialize
PreviousactionNextaddMutationListener

Last updated 5 years ago