mobx-keystone
    Preparing search index...

    Function onSnapshot

    • Adds a reaction that will trigger every time an snapshot changes.

      Type Parameters

      • T extends object

        Object type.

      Parameters

      • nodeOrFn: T | (() => T)

        Object to get the snapshot from or a function to get it.

      • listener: OnSnapshotListener<T>

        Function that will be triggered when the snapshot changes.

      Returns OnSnapshotDisposer

      A disposer.