freya::prelude

Function use_id

Source
pub fn use_id<T>() -> usize
where T: 'static,
Expand description

Get a unique for a given generic type.

Every component using this hook will get a different ID.

The ID does not change in between renders.

To use it inside other hooks check UseId::get_in_hook