lazyStateGetterSetter<T> method
Side effect that provides a way for capsules to contain some state, where the initial state is computationally expensive. Further, instead of returning the state directly, this instead returns a getter that is safe to capture in closures.
Similar to the useState
hook from React;
see https://react.dev/reference/react/useState
NOTE
New applications are recommended to use lazyData instead.
Implementation
@Deprecated('Use `use.lazyData` instead')
ValueWrapper<T> lazyStateGetterSetter<T>(T Function() init) =>
use.lazyData(init);