Skip to content

Reference 395

Reference: id 395

Generated from apps/docs-astro/src/generated/docs.json

emitMode
Kind 1024 id: 395

Optimization strategy for state change events. This setting controls how the engine handles state snapshots when emitting `:stateChange` events, balancing between performance and data accuracy. **Performance Impact:** - `acc` (acc): Deep clones the old state before modifications, ensuring complete isolation between `oldState` and `newState` objects. Use when you need guaranteed data integrity but may impact performance with large state objects. - `perf` (performance): Avoids deep cloning for better performance. In rare edge cases with complex state caching scenarios, `oldState` and `newState` might reference the same object, but provides significant performance benefits for large states.

Type: "perf" | "acc"

Source: apps/library/src/types/if-engine.ts :205 (view)

View by name: emitMode

See in /reference/all

Tags
  • @default```ts "acc" ```