Skip to content

Flux is a write-once UI language that compiles to native iOS and Android. If you know React Native, most of the vocabulary transfers with a syntax change. This guide maps RN concepts to Flux primitives and names the gaps plainly: Flux targets the common 90% of app screens — forms, navigation, state, capabilities — not 100% of RN’s surface.

React Native Flux Notes
function Component() { return <View>… } compo Name with an indented body Children indent beneath a view call that carries a named prop
<View style={{flexDirection:'column'}}> Column Flux splits RN’s View into Column/Row by design
<View style={{flexDirection:'row'}}> Row Same split, horizontal
<Text> Text Interpolate signals with {expr}
<Button> Button onPress takes a Handler closure
<TextInput> TextInput Controlled: text: $binding, onChangeText
<Image> Image source takes an asset path
react-navigation Router + Screen Navigate via RouterNav.navigate

The stdlib’s public component names mirror RN naming deliberately (see ADR-0053 on public-surface naming), so muscle memory survives the port.

React Native Flux
useState state name: Type = initial at the top of a compo
setState(v) Assign the signal: name = v inside a handler
Derived value in render A read-only let computed from signals
Context / Redux A store compo lifted above consumers; values as props

The mental shift: there is no re-render cycle to opt into. Assignment propagates through the signal graph, and only the nodes that read the written signal recompose. See state management.

React Native Flux
.map over data into elements ForEach(tasks, key: fn(t) { t.label }) { item => … }
key prop The key function argument
Mutate array + setState tasks.append(...) / tasks.remove(task) / tasks.clear()

The reconciler matches children by node ID and the key function, so existing rows reorder and patch in place instead of rebuilding.

React Native Flux
useEffect(fetch) A capability call returning a result cell (Ready/Pending/Error)
Loading branches Render from the cell: name ?? "Loading..."
Native modules Capabilities with stable ids (Storage, Camera, Clipboard, Location…)

There is no async keyword in handlers — async work settles through the capability result cell, and results land back on the reactive dispatcher for you. See capabilities.

These gaps are real as of this writing — plan around them rather than discovering them in review:

  • Stylesheets and flex props. There is no StyleSheet.create or arbitrary style object. Layout is expressed through Column/Row gap/alignment and per-component props. Design tokens and theming are a roadmap item.
  • Third-party component libraries. Only the stdlib primitives exist. For web content there is a WebHost primitive that embeds web views; deeper native interop is an escape-hatch concern.
  • Web target. Flux renders natively on iOS and Android only. There is no web backend.

If your app depends heavily on one of these, hold off on the port — but the common screens (forms, navigation, state, capability-backed data) transfer directly.