emitMode 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)