react-native-reusables is a React Native UI component library that adapts the shadcn/ui copy-paste component model to React Native. It is a pnpm/Turborepo monorepo containing a Next.js/Fumadocs documentation site (apps/docs), an Expo SDK 56 showcase app for live cross-platform previews (apps/showcase), a scaffolding CLI built on Effect-TS (apps/cli), and a shared registry package (packages/registry) with roughly 30 styled components — Button, Dialog, Select, Accordion, Dropdown Menu, Tooltip, and others — plus higher-level authentication blocks (sign-in, sign-up, forgot/reset password, verify email) with optional Clerk integration. There is no data science or analytics code; it is purely a component library and developer-tooling project. The central architectural decision is dual styling-engine support: every component is implemented twice, once for Nativewind and once for Uniwind, both wrapping @rn-primitives (Radix-style primitives ported to React Native). Components use class-variance-authority for variant management, a Slot primitive for asChild composition, a TextClassContext that propagates text styles down component hierarchies (a non-obvious workaround for React Native's lack of CSS style cascading), and a portal/overlay system that uses iOS FullWindowOverlay on native platforms and fragments on web. The target platforms are iOS, Android, and web via Expo. Component source is serialized into shadcn-compatible registry JSON files (public/r/nativewind/*.json and public/r/uniwind/*.json) consumed by both the docs site and the CLI, with catalogs.dev YAML metadata driving publishing and discoverability. The CLI's init/add/doctor commands wrap the shadcn installation machinery with additional project intelligence: the doctor command validates dependencies and detects deprecated file patterns, and project-config.ts parses a project's metro.config.js to determine whether Nativewind or Uniwind is active before writing components.json. The add command delegates component installation to shadcn. Several auth blocks contain explicit TODO placeholders for navigation and form-submission logic that consumers must implement. The dominant maintenance burden is the deliberate duplication across the two styling engines — every API or visual change must be mirrored in both variants, and the generated registry JSON can drift from source files. Dependencies (Expo SDK 56, React Native 0.85.3, Nativewind 4.2.2, Uniwind 1.6.3) are current, and the repo tracks its ecosystem proactively.
This repository provides a library and build-time plugin for embedding a React (or Preact / React Native Web) web application inside a React Native WebView, with automatic bundling and two-way communication between the native and web sides. It consists of a Metro transformer plugin that uses Babel AST analysis to detect entry files (those calling webViewRender or webViewCreateRoot), then bundles the web app via esbuild with custom asset loaders for images, CSS, JSON, text, Markdown, and WebAssembly. The bundled output is wrapped in an HTML string and returned as the module source, which is then loaded into a react-native-webview at runtime. The library exposes React hooks (useWebViewMessage for native, useNativeMessage and emit for web) that handle message passing via window.postMessage and ReactNativeWebView.postMessage. The architecture is a classic library + build plugin pattern, with clear separation between native (React Native) and web (React DOM) concerns. The codebase is TypeScript, has end-to-end Playwright tests with HTML snapshots, unit tests, and thorough type definitions. It is designed for rapid prototyping or features that require web-specific APIs (e.g., WebAssembly, contenteditable) without rewriting the entire UI for React Native.