# use_resource

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-view/hooks/function-use_resource/

**function** · [`ferroui-view`](/docs/0.5.0/api/ferroui-view/) · v0.5.0

```rust
fn use_resource(key: &str) -> Option<ferroui_base::BoxedValue>
```

The resource `key` as the control the component is mounted in finds it
(its resources, those of its ancestors, the application's and the
theme's, for its theme variant), as it is now; the component runs again
when it changes (another theme variant, a resource dictionary changed).

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.View/hooks.rs#L290)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
