Skip to main content

addComputed

FitFileViewer - API Documentation v29.4.0


FitFileViewer - API Documentation / utils/state/core/computedStateManager / addComputed

Function: addComputed()

addComputed(key: string, computeFn: Function, deps: string[]): Function

Defined in: utils/state/core/computedStateManager.js:264

Register a computed value (convenience function)

Parameters​

key​

string

Unique key for the computed value

computeFn​

Function

Function that computes the value

deps​

string[] = []

Array of state paths this computed value depends on

Returns​

Function

Cleanup function