Skip to content

feat(native): compile styled-components/native and @emotion/native - #1050

Merged
owjs3901 merged 5 commits into
feat/react-native-animationsfrom
feat/react-native-compat
Nov 28, 2026
Merged

owjs3901 merged 5 commits into
feat/react-native-animationsfrom
feat/react-native-compat

Conversation

@owjs3901

Copy link
Copy Markdown
Contributor

Part of #411, depends on #1049 (base: feat/react-native-animations). PR 10 of the React Native plan: compat for styled-components/native and @emotion/native (design §8 step 7, and the "ThemeProvider, compat useTheme/withTheme: context over the same store" row).

What it does

Files importing styled-components/native or @emotion/native compile with neither package at runtime. Their styled and css compile as Devup UI's, so the CSS is parsed once at build time. Those libraries otherwise parse it with css-to-react-native on every render.

import styled, { ThemeProvider, useTheme } from 'styled-components/native'

export const Title = styled.Text`
  color: ${(props) => props.theme.primary};
  font-size: 18px;
`
export const Card = styled.View({ padding: 8, bg: '$primary' })
import { ThemeProvider, useStyledTheme as useTheme } from "@devup-ui/react/native";
import { useThemeIndex as __useThemeIndex, useStyledTheme as __useStyledTheme, defineThemes as __defineThemes } from "@devup-ui/react/native";
import { Text as __Text, View as __View } from "react-native";
export const Title = (__props) => {
  const __themed = { theme: __useStyledTheme(), ...__props };
  return <__Text {...__props} style={[__s.b, { color: ((props) => props.theme.primary)(__themed) }, __props.style]} />;
};
export const Card = (__props) => {
  const __t = __useThemeIndex();
  return <__View {...__props} style={[__s.c, [__s.d, __s.e][__t], __props.style]} />;
};
  • Imports: the default export (and a named styled) is styled, and css is css; both are removed.
    • ThemeProvider and withTheme import from @devup-ui/react/native, and useTheme imports as its useStyledTheme.
    • Every other import stays on the package as written, type-only ones included (for example ThemeContext).
  • styled.Name: styled.View, styled.Text, styled.Pressable and any other styled.Name render React Native's component of that name. It is imported once per file. This works for Devup UI's own styled too. styled(X) works as in feat(native): styled() on React Native #1047.
  • Numbers are pixels, as those packages read them: padding: 8 is 8, not Devup UI's 8 * 4. Unitless properties (opacity, flex, …) and durations stay numbers. A value read at runtime converts at scale 1. On the web, compat also reads Emotion's numbers as pixels.
  • Superset: Devup UI's shorthands, $ tokens, responsive arrays and _active-style blocks work in these styles too.
  • Theme: a function part is called with the props plus theme, the theme of the nearest ThemeProvider (a theme prop the caller gives wins). The hook is called only when a function part reads the props.
    • A function that returns an object returns React Native styles, which are passed on as they are. Devup UI's own styled() still rejects this, because it would need to convert style props.
  • Runtime: ThemeProvider, useStyledTheme and withTheme are a React context. A provider's theme is merged over the outer provider's, or a function of that theme can make it. They reuse the web compat entry's StyledThemeContext and withTheme (forwarded refs, hoisted statics). Only the provider is new, because the web provider declares CSS variables.

Runtime size

Measured with bun build --minify (react, react-native and react/jsx-runtime external) and then gzip -9. Metro does not tree-shake, so an app using the runtime bundles all of it.

Minified Minified + gzip
Before this PR 1,302 B 702 B
After this PR 2,373 B 1,185 B

Build errors

  • with runtime: false: ThemeProvider, useTheme and withTheme from these packages
  • a namespace import (import * as S from 'styled-components/native'), as for @devup-ui/react

Expo example and CI

  • The native runtime now imports dist/utils/theme-context and dist/utils/with-theme. check-bundle.mjs accepts those two modules as part of the runtime, and still rejects any other module of @devup-ui/react. Locally, expo export passes the check.
  • CI: feat/react-native-animations is added to the pull_request branches of the workflow. It will be removed when this PR is retargeted.

Tests

  • Rust (insta + rstest) covers:
    • styled-components with styled.Text CSS text that reads props.theme;
    • styled.View objects with theme tokens, styled(Box), function parts, and kept imports;
    • Emotion with styled.Pressable press styles, function objects, pixel numbers in objects and CSS text, runtime values, and animated styled.View/styled.Pressable;
    • a named styled;
    • runtime: false and namespace errors;
    • a file that only mentions a package.
  • cargo test --workspace passes. There are no web snapshot changes.
  • clippy -D warnings and cargo fmt are clean.
  • Local cargo llvm-cov shows every new line covered.
  • Runtime bun tests:
    • nested providers, function themes, and outside any provider;
    • withTheme with the context theme and with a given theme.
    • The runtime keeps 100% coverage.

#411의 일부이며 #1049에 의존합니다 (base: feat/react-native-animations). React Native 계획의 10번째 PR로, styled-components/native와 @emotion/native compat입니다(설계 §8의 7단계, 그리고 "ThemeProvider, compat useTheme/withTheme: 같은 store 위의 context" 항목).

변경 내용

styled-components/native나 @emotion/native를 import하는 파일은 런타임에 두 패키지 없이 컴파일됩니다. 두 패키지의 styled와 css는 Devup UI의 것으로 컴파일되므로, CSS는 빌드할 때 한 번만 파싱합니다. 원래 라이브러리는 렌더링할 때마다 css-to-react-native로 파싱합니다(위 예시 참고).

  • import: default export(그리고 named styled)는 styled, css는 css가 되며 둘 다 제거됩니다.
    • ThemeProvider·withTheme는 @devup-ui/react/native에서, useTheme는 그곳의 useStyledTheme로 import합니다.
    • 그 밖의 import는 타입 전용을 포함해 원래 패키지에 그대로 남습니다(예: ThemeContext).
  • styled.Name: styled.View·styled.Text·styled.Pressable 등 모든 styled.Name은 같은 이름의 React Native 컴포넌트로 렌더링합니다. 이 컴포넌트는 파일마다 한 번 import합니다. Devup UI의 styled에서도 동작하며, styled(X)는 #1047과 같습니다.
  • 숫자는 픽셀: 두 패키지가 읽는 방식대로 padding: 8은 Devup UI의 8 * 4가 아니라 8입니다. 단위 없는 속성(opacity, flex 등)과 duration은 숫자로 남습니다. 런타임에 읽는 값은 scale 1로 변환합니다. 웹의 compat도 Emotion의 숫자를 픽셀로 읽습니다.
  • superset: 이 스타일에서도 Devup UI의 shorthand, $ 토큰, 반응형 배열, _active 같은 블록을 쓸 수 있습니다.
  • 테마: 함수 부분은 props에 theme을 더해 호출됩니다. theme은 가장 가까운 ThemeProvider의 테마이며, 호출하는 쪽이 준 theme prop이 우선합니다. hook은 함수 부분이 props를 읽을 때만 호출합니다.
    • 객체를 돌려주는 함수는 React Native 스타일을 돌려주는 것으로 보고 그대로 넘깁니다. Devup UI 자체의 styled()는 style prop을 변환해야 하므로 여전히 에러입니다.
  • 런타임: ThemeProvider·useStyledTheme·withTheme는 React context입니다. provider의 테마는 바깥 provider의 테마 위에 병합되거나, 그 테마를 받는 함수로 만들 수 있습니다. 웹 compat entry의 StyledThemeContext와 withTheme(ref 전달, static hoist)를 재사용합니다. 웹 provider는 CSS 변수를 선언하므로, 새로 만든 것은 provider 하나뿐입니다.

런타임 크기

bun build --minify(react, react-native, react/jsx-runtime은 external)로 번들한 뒤 gzip -9로 측정했습니다. Metro는 tree-shaking을 하지 않으므로, 런타임을 쓰는 앱은 런타임 전체를 번들합니다.

minified min+gz
이 PR 이전 1,302 B 702 B
이 PR 이후 2,373 B 1,185 B

빌드 에러

  • runtime: false일 때 두 패키지의 ThemeProvider·useTheme·withTheme
  • @devup-ui/react와 마찬가지로 namespace import(import * as S from 'styled-components/native')

Expo 예제와 CI

  • 이제 네이티브 런타임이 dist/utils/theme-context와 dist/utils/with-theme를 import합니다. check-bundle.mjs는 이 두 모듈을 런타임의 일부로 인정하고, @devup-ui/react의 다른 모듈은 여전히 거부합니다. 로컬에서 expo export가 검사를 통과했습니다.
  • CI: workflow의 pull_request branches에 feat/react-native-animations를 추가했습니다. 이 PR의 base를 바꿀 때 제거합니다.

테스트

  • Rust (insta + rstest)가 다루는 것:
    • props.theme을 읽는 styled-components의 styled.Text CSS 텍스트;
    • 테마 토큰이 든 styled.View 객체, styled(Box), 함수 부분, 남는 import;
    • Emotion의 styled.Pressable press 스타일, 함수 객체, 객체와 CSS 텍스트 안의 픽셀 숫자, 런타임 값, 애니메이션이 있는 styled.View/styled.Pressable;
    • named styled;
    • runtime: false와 namespace 에러;
    • 패키지 이름만 언급하는 파일.
  • cargo test --workspace가 통과합니다. 웹 snapshot 변경은 없습니다.
  • clippy -D warnings와 cargo fmt는 깨끗합니다.
  • 로컬 cargo llvm-cov에서 새로 추가한 줄은 모두 커버됩니다.
  • 런타임 bun 테스트:
    • 중첩된 provider, 함수 테마, provider 바깥;
    • context 테마와 직접 준 테마를 쓰는 withTheme.
    • 런타임 coverage는 100%를 유지합니다.

🤖 Generated with Claude Code

owjs3901 and others added 2 commits November 21, 2026 15:18
Their `styled` (with `styled.View` and any other `styled.Name`) and
`css` compile as Devup UI's, with numbers as pixels as those packages
read them. Function parts get `props.theme` from the runtime's new
`ThemeProvider`, and `ThemeProvider`, `useTheme` and `withTheme` import
from the React Native runtime, sharing the web compat theme context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ement

Tarpaulin counted the deferred `let pixels;` as an uncovered line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

Files with missing lines Coverage Δ
libs/extractor/src/native/element.rs 100.00% <100.00%> (ø)
libs/extractor/src/native/element/animation.rs 100.00% <100.00%> (ø)
libs/extractor/src/native/element/css_call.rs 100.00% <100.00%> (ø)
libs/extractor/src/native/element/styled.rs 100.00% <100.00%> (ø)
libs/extractor/src/native/errors.rs 100.00% <ø> (ø)
libs/extractor/src/native/imports.rs 100.00% <100.00%> (ø)
libs/extractor/src/native/mod.rs 100.00% <100.00%> (ø)
packages/react/src/native/index.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

owjs3901 and others added 2 commits November 29, 2026 00:34
Bring in main (#1042 squashed, #1043, #1055, #1056) and the stack's
squash-merge resolutions: keep the compat number conversion's TIMED and
number_code imports while taking main's shared runtime units import in
place of the inline converter, and drop the merged branches from the
pull_request triggers.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring in main's #1057, #1058, #1061 and #1062, and take #1063's
pull_request trigger, which runs the checks whatever branch a pull
request targets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@owjs3901
owjs3901 merged commit ac22019 into feat/react-native-animations Nov 28, 2026
39 checks passed
@owjs3901
owjs3901 deleted the feat/react-native-compat branch November 28, 2026 17:41
owjs3901 added a commit that referenced this pull request Nov 29, 2026
…1049)

* feat(extractor): compile Devup UI elements to React Native styles

Add a Native target to ExtractOption that turns Devup UI elements into
React Native components with their styles hoisted into one
StyleSheet.create per file, and expose it as codeExtractNative in the
WASM and NAPI bindings.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(extractor): cover the React Native target and wire codeExtractNative into the ABI checks

Snapshot every supported prop shape, platform and build error of the
native target, list codeExtractNative in the binding ABI guards and the
cross-engine corpus, document it and add its changepack.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(extractor): convert style values read at runtime on React Native as literals are

A dynamic length such as p={x} reached React Native unscaled, so x = 2
gave padding 2 where the web build gives 8px for the constant. Wrap
values read at runtime in a file-local function that converts them as
the build converts a literal: numbers and numeric strings take the
property's scale (four pixels a unit for lengths), px lengths become
numbers and rem/em lengths become pixels. Colors, keywords and other
text pass through as they are.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(extractor): drop the needless raw string hashes and note runtime conversion in the changepack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(metro-plugin): compile Devup UI for React Native in Metro

Add @devup-ui/metro-plugin (experimental, private 0.x): withDevupUI()
points babelTransformerPath at a transformer that runs codeExtractNative
on files importing Devup UI and chains to the upstream transformer
(the config's, else Expo's, else React Native's). Build errors carry
loc and a code frame so Metro reports file:line:col, the upstream AST
locations are moved back to the source through the engine's map, and
the cache key covers the upstream key, devup.json, the engine version
and the options.

Add apps/expo (Expo SDK 58, RN 0.88) and a path-filtered CI job that
exports iOS and Android bundles and checks no @devup-ui/react module
or runtime placeholder is left.

Part of #411.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: drop the react-native-core pull request branch now that it is merged

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): theme tokens, multiple themes and the React Native runtime

Resolve `$` tokens and typography of devup.json at build time for React
Native. With one theme every value is a literal and no runtime is imported;
with more, each theme's styles are precomputed and picked by the index
`useThemeIndex()` of the new `@devup-ui/react/native` runtime gives, which
follows the OS appearance and `setTheme`. `_theme*` and the theme API
compile, and `runtime: false` keeps them build errors. The Metro plugin
registers devup.json's theme, and the Expo example gains a theme toggle and
a bundle check that static files do not use the runtime.

Part of #411.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* ci: load the React Native runtime entry with a react-native stand-in

verify-dist loads every declared entry, and `@devup-ui/react/native`
imports react-native, which is Flow source Bun cannot parse. A virtual
module stands in for it so the entry still loads and exports.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): cover theme merges and a typography a theme lacks

Cover a typography whose token one theme does not define, a static style
merged into a themed one, and a later style checked against a choice that
applies in one theme. A merge that leaves every theme declaring the same
styles now collapses to one static style instead of picking between equal
objects.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): responsive values, responsive tokens and orientation on React Native

Responsive arrays, length/shadow/typography tokens with a value at each
breakpoint, responsive values in platform, theme and orientation blocks and
conditions compile to one style object for each run of breakpoints that
share their styles (by breakpoint and theme where both differ). The runtime
store of @devup-ui/react/native also tells the breakpoint of devup.json the
window is at and its orientation through one Dimensions listener that
notifies only when a breakpoint is crossed or the window turns.
_portrait/_landscape apply by orientation. With runtime: false these stay
build errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(verify-dist): give the react-native stand-in Dimensions

The React Native runtime now reads the window size through Dimensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): press styles through Pressable on React Native

`_active` and its React Native name `_pressed` make the element a
`Pressable` whose `style` is a function of whether it is pressed:
`({ pressed }) => [styles.a, pressed && styles.b]`. A `Box`, `Flex`,
`Center` or `VStack` with a press style becomes a `Pressable`; a `Button`
already is one. Press styles combine with responsive values, themes,
platforms, orientations and conditions, and need no runtime, so they work
with `runtime: false` too. On a `Text`, an `Image` or an `Input`, and with
`as`, they are build errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wip(native): css() and className on React Native

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wip(native): drop a probe test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(native): apply theme, orientation and press blocks after the other styles

On the web, `_themeDark`, `_landscape` and `_active` win over the element's
other styles whatever the order of the props, as their selectors and media
queries do. On React Native they followed the order of the props, so
`<Box _active={{ bg: 'red' }} bg="blue" />` (the order ESLint sorts props
in) never turned red, and a later `bg` dropped a `_themeDark` one. The
styles of these blocks now come after the element's other styles, at every
level of nesting. Platform blocks keep the order of the props.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): cover a static style checked against one kept in order

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): css() as CSS text, README and changepack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): pass classes to style_code in the merged test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): cover css() parts around state blocks and empty objects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): cover a static style checked against a state block

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): styled() on React Native

`styled(Target)(...parts)`, `` styled(Target)`css text` `` and
`styled(Target, styles)` compile to a function component rendering its
target with the styles they describe, before the `style` it is given. The
parts are those of `css()`; a function in them is called with the props, as
a value or as a part giving what `css()` gives. A Devup UI target keeps the
styles it declares first, a styled `Box` with a press style becomes a
`Pressable`, and the hooks the styles read are called in the component.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): hover, focus and disabled styles on React Native

`_hover` and `_focus` read the `hovered` and `focused` that `Pressable`
gives its style function, and make a `Box` a `Pressable` as `_active` does.
An `Input` with `_focus` renders through the runtime's new `Focused`, which
follows its focus events. `_disabled` applies while the element's
`disabled` prop is true, or a `styled()` component's. In `css()` these are
build errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): animations and transitions on react-native-reanimated

`keyframes()` compiles to the keyframes object react-native-reanimated
reads, and an element taking an `animation*` or `transition*` prop
renders Reanimated's animated component. Reanimated stays out of the
dependencies: `codeExtractNative` takes a `reanimated` argument, which
the Metro plugin sets from whether the project has it, and without it
these are build errors asking to install it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): css() and className on React Native (#1046)

* wip(native): css() and className on React Native

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* wip(native): drop a probe test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): css() as CSS text, README and changepack

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): pass classes to style_code in the merged test

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* test(native): cover css() parts around state blocks and empty objects

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): responsive values, responsive tokens and orientation on React Native (#1044)

* feat(native): responsive values, responsive tokens and orientation on React Native

Responsive arrays, length/shadow/typography tokens with a value at each
breakpoint, responsive values in platform, theme and orientation blocks and
conditions compile to one style object for each run of breakpoints that
share their styles (by breakpoint and theme where both differ). The runtime
store of @devup-ui/react/native also tells the breakpoint of devup.json the
window is at and its orientation through one Dimensions listener that
notifies only when a breakpoint is crossed or the window turns.
_portrait/_landscape apply by orientation. With runtime: false these stay
build errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(verify-dist): give the react-native stand-in Dimensions

The React Native runtime now reads the window size through Dimensions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): hover, focus and disabled styles on React Native (#1048)

`_hover` and `_focus` read the `hovered` and `focused` that `Pressable`
gives its style function, and make a `Box` a `Pressable` as `_active` does.
An `Input` with `_focus` renders through the runtime's new `Focused`, which
follows its focus events. `_disabled` applies while the element's
`disabled` prop is true, or a `styled()` component's. In `css()` these are
build errors.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): compile styled-components/native and @emotion/native (#1050)

* feat(native): compile styled-components/native and @emotion/native

Their `styled` (with `styled.View` and any other `styled.Name`) and
`css` compile as Devup UI's, with numbers as pixels as those packages
read them. Function parts get `props.theme` from the runtime's new
`ThemeProvider`, and `ThemeProvider`, `useTheme` and `withTheme` import
from the React Native runtime, sharing the web compat theme context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(metro-plugin): fix the duplicated README of the compat section

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(native): cover the pixel conversion of compat numbers in one statement

Tarpaulin counted the deferred `let pixels;` as an uncovered line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* feat(expo): export and check the example on the web (#1051)

* feat(native): compile styled-components/native and @emotion/native

Their `styled` (with `styled.View` and any other `styled.Name`) and
`css` compile as Devup UI's, with numbers as pixels as those packages
read them. Function parts get `props.theme` from the runtime's new
`ThemeProvider`, and `ThemeProvider`, `useTheme` and `withTheme` import
from the React Native runtime, sharing the web compat theme context.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(metro-plugin): fix the duplicated README of the compat section

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(expo): export and check the example on the web

The Expo example exports for the web through react-native-web with the
same compiled output as iOS and Android. CI checks the web bundle as the
others and opens it in Chromium: the card's theme color and its switch,
the input's focus style and a button press.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* fix(native): cover the pixel conversion of compat numbers in one statement

Tarpaulin counted the deferred `let pixels;` as an uncovered line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* feat(native): type the theme and React Native props of each component (#1052)

Metro writes df/theme.d.ts (the tokens of devup.json) and df/native.d.ts
when it reads the config, as the web plugins do. native.d.ts imports the
new @devup-ui/react/native/types, which fills the new DevupElementProps
augmentation point so each component takes the props of the React Native
component it renders. Web types are unchanged. The Expo example now
type-checks in CI.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

* docs(landing): document React Native and its differences from the web (#1053)

* feat(native): type the theme and React Native props of each component

Metro writes df/theme.d.ts (the tokens of devup.json) and df/native.d.ts
when it reads the config, as the web plugins do. native.d.ts imports the
new @devup-ui/react/native/types, which fills the new DevupElementProps
augmentation point so each component takes the props of the React Native
component it renders. Web types are unchanged. The Expo example now
type-checks in CI.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(landing): document React Native and its differences from the web

A React Native page in the docs: setup with Metro, the elements, a table of
what differs from the web (output, runtime, units, themes, breakpoints,
states, selectors, animations, compat) and Expo web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant