Skip to main content

define

FitFileViewer - API Documentation v29.4.0


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

Function: define()

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

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

Alias for addComputed (convenience function for backward compatibility)

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