use_memo
Memoize a computed value between renders.
Parameters:
- calculate_value (Callable[[], MemoValueT]) - A function that computes the value to be memoized.
- dependencies (Sequence[Any] | None, default:
None) - Values the computation depends on. If absent, the value is recomputed on every render. If empty, it is computed only on the first render. Otherwise, it is recomputed only when one of the dependencies has changed. A list or dict field of anobservablecounts as changed when it is changed in place, such as byitems.append(x).
Returns:
- MemoValueT - The memoized value. The same object is returned on every render until the value is recomputed.