pub fn use_computed_with_prev<T: 'static + Clone, D: PartialEq + 'static>(
deps: D,
init: impl FnOnce(Option<T>) -> T,
) -> T
Expand description
Alternative to use_memo Benefits:
- No unnecessary rerenders
- Prev value is
T
instead of&mut T
Downsides: - T needs to be Clone (cannot be avoided)