How to use the proxy-state-tree.ProxyStateTree function in proxy-state-tree

To help you get started, we’ve selected a few proxy-state-tree examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cerebral / overmind / packages / node_modules / overmind / src / index.ts View on Github external
private createProxyStateTree(
    configuration: IConfiguration,
    eventHub: EventEmitter | MockedEventEmitter,
    devmode: boolean
  ) {
    const proxyStateTree = new ProxyStateTree(
      this.getState(configuration) as any,
      {
        devmode,
        dynamicWrapper: (tree, path, func) =>
          func(eventHub, tree, proxyStateTree, path),
        onGetter: devmode
          ? (path, value) => {
              this.eventHub.emitAsync(EventType.GETTER, {
                path,
                value: safeValue(value),
              })
            }
          : undefined,
      }
    )

proxy-state-tree

An implementation of the Mobx/Vue state tracking approach, for library authors

MIT
Latest version published 3 years ago

Package Health Score

54 / 100
Full package analysis

Popular proxy-state-tree functions