Performance
How ARCUI separates React semantics, JavaScript work, native layout, and UI-thread animation before optimizing.
ARCUI is performance-oriented, but performance work follows correctness and accessibility rather than replacing them.
UI-thread-first does not mean JavaScript-free
Application state, callbacks, validation, network work, persistence, and structural rendering still belong in React/JavaScript when they are semantic application work.
ARCUI's goal is narrower: avoid using JavaScript as a frame driver for visual work Reanimated can keep on the UI thread.
Identify the cost before changing architecture
A runtime issue may come from very different places:
React render / reconciliation
JavaScript callbacks or business logic
input processing
gesture processing
native layout
UI-thread animation
network / storage / serialization
development toolingTreating all of these as “FPS” hides the actual bottleneck.
A brief development-mode fluctuation is not by itself a reason to redesign a component when interaction and UI-thread motion remain smooth on the target runtime.
Controlled state is not a performance bug
Controlled ownership is deliberate.
Do not move semantic React state into SharedValues merely to avoid a render. That would trade a visible render for hidden ownership and accessibility correctness problems.
Use SharedValues for continuous visual state; keep application meaning in React.
Slider demonstrates the boundary
Slider movement can stay visually smooth on the UI thread while callbacks represent snapped semantic values.
<Slider
value={value}
onValueChange={setValue}
onValueCommit={persistValue}
/>Use live callbacks only for work that genuinely needs live semantic updates. Use commit callbacks for persistence, analytics, network requests, or expensive application work that belongs after interaction ends.
Keep independent visual dimensions independent
Do not force unrelated visual state into one large ordinal animation state machine when separate SharedValues model the behavior more clearly.
When modifiers overlap, make visual priority explicit rather than relying on incidental animation timing.
Token extraction in worklets
Tokens are configuration objects. For frame-level custom animation, extract the primitive values a worklet needs rather than repeatedly traversing large token objects during visual updates.
const dark = tokens.colors.dark.background.screen;
const light = tokens.colors.light.background.screen;
const style = useAnimatedStyle(() => ({
backgroundColor: interpolateColor(
themeProgress.value,
[0, 1],
[dark, light],
),
}));Async application work stays application-owned
Components such as Select expose async/search lifecycle through public callbacks and props instead of hiding network ownership inside ARCUI animation state.
That keeps loading, cancellation, caching, and data freshness under the application's control.
Memoize when it solves a real cost
ARCUI uses memoization where useful, but custom memo comparators are not the default.
Never add a comparator that can stale callbacks, render props, or semantic state just to reduce a theoretical render count.
Validate on the target runtime
For gesture-heavy, overlay-heavy, or content-heavy scenarios, test actual devices and production-like builds.
Simulator/dev-tool overhead is evidence to investigate, not a substitute for runtime profiling.
Related components
UI-thread press and theme transitions around React-owned semantics.
Gesture-driven visual updates plus live/commit semantic callbacks.
Determinate visual progress without frame-by-frame React state.
Continuous loading motion on the UI thread.
External async/search ownership instead of hidden network lifecycle.