# ComponentRefresh

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-hot-reload/trait-componentrefresh/

**trait** · [`ferroui-hot-reload`](/docs/0.5.0/api/ferroui-hot-reload/) · v0.5.0

```rust
trait ComponentRefresh
```

Prepares application reference/subscription changes without mutating the live component.
Commit runs after content and namescope replacement. Rollback runs after restoring the
previous graph; finish runs only after every target commits. Retain old subscriptions
until finish, dispose new subscriptions on rollback, and never rerun constructors.
As with ReloadTarget, the application must provide reversible, non-panicking cleanup.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L65)

## Members

- [`prepare`](#function-prepare)

<a id="function-prepare"></a>

### prepare

```rust
fn prepare(self: &Self, root: &Ref<StyledElement>, scope: Option<&NameScopeRef>) -> Result<Box<dyn PreparedReload>, ReloadError>
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.HotReload/component.rs#L66)

## Availability

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