How-tos
Short, direct answers to “how do I do X” — each page is a lookup, not a tutorial. For the concept behind an answer, follow the link into Learn or API; for a full copyable app, see Examples.
Available how-tos
Section titled “Available how-tos”- Style a component —
StyleSheet.createvs a Vue SFC<style>block. - Animate a value —
Animated.Value, and when the native driver can take over from the JS one. - Handle press/change events — React callback props,
Vue emits, Angular
@Output(). - Two-way bind a value — Vue
v-model, Angular[(value)]. - Share content across surfaces —
createPortal/TeleportvscreateTunnel. - Write platform-specific code — the
X.ios.ts/X.android.ts/X/shared.tsfolder convention. - Wrap a third-party native view — why the library’s React component can’t be reused, and what can.
- Wire up an Expo native module — the
one-time per-app native setup every
expo-modules-corewrapper package (Sensors, Haptics, Clipboard, …) needs before it resolves at runtime. - Add a native splash screen — generate the native
binary, wire it into the native project, then
hide()it from JS. - Turn on diagnostic logging —
dlog/isDebugand theDEBUGenv var. - Refs and attachments in Svelte —
bind:thisvs{@attach}for imperative access to a host node. - Catch render errors (Svelte) —
<svelte:boundary>, afailedsnippet, andreset().