getDerivedAppState

static getDerivedAppState(appState)

Similar to getDerivedStateFromProps, Amorphous supports a static getDerivedAppState method on the RootAppComponent only. This function may be used to trigger additional modifications of appState when appState is modified, which can be useful for caching expensive calculations or time-unique values.

Example:



results matching ""

    No results matching ""