rive trained

The learned layer of the rive guru: the asset owns visual behavior, its authored identifiers form the runtime contract, and application code supplies product data through that contract.

mental model

The asset owns visual behavior and its authored identifiers form the runtime contract. Application code provides product data through the contract.

examples

battery-rml is a local View Model asset for CLI inspection and capture. It is not evidence for any application runtime.

best practices

  • Use View Model data binding for new integration.
  • Select an artboard and state machine from the actual asset, never guessed text.
  • Keep a Rive React hook and its returned component in one mounted wrapper.

strengths

View Models represent persistent, typed asset data and can drive transitions, properties, and nested structures from one authored contract.

weaknesses / pain points

CLI verification, a headless capture, and a target runtime exercise different boundaries. Passing one does not prove either of the others.

gotchas

  • State machine inputs and runtime Rive events are deprecated, though existing files can continue to use them.
  • A Rive host needs size; an unsized host can render nothing.
  • Runtime API names and renderer packages vary by platform and version.

known bugs

No Rive runtime bug is known here. Investigate a reported runtime issue on the affected platform, with its installed version and asset.

troubleshooting

problemfix
data or interaction does not bindverify the exact authored View Model, instance, and property names
RML compiles but looks wrongcapture the representative state, then inspect the asset and target runtime
existing input/event integration needs changepreserve it or migrate the asset to data binding using Rive's migration guide

practiced cases

The battery-rml sample verifies with the rive CLI (1.2.0) at zero errors and zero warnings. Inspection with --summary is accepted, and a --data=level=0.2 headless capture produces a 500x500 PNG. That proves the CLI boundary; no web, native, or game runtime runs in this check.

Primary sources: CLI commands, data-binding migration, and React runtime.

search pages

go to any page