Function yew::functional::use_ref[][src]

pub fn use_ref<T: 'static>(initial_value: impl FnOnce() -> T) -> Rc<T>
Expand description

This hook is used for obtaining a immutable reference to a stateful value. Its state persists across renders.

If you need a mutable reference, consider using use_mut_ref. If you need the component to be re-rendered on state change, consider using use_state.