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.
Returns:
- MemoValueT - The memoized value. The same object is returned on every render until the value is recomputed.