Command palette

@yasinsensoy/native
v0.1.092 components

@yasinsensoy/native

React Native (Android and iOS) components with the same API and look as @yasinsensoy/web; no extra dependencies.

@yasinsensoy/native: React Native (Android and iOS) components. The same API, the same theme tokens and the same names as @yasinsensoy/web (web); the same look on both platforms. No extra dependencies: icons are drawn with the library's own native drawing view.

Each component folder has its own subpath (@yasinsensoy/native/button, /text-field, /theme…). Metro does not drop unused exports (no tree shaking). So add the Babel plugin; it rewrites root imports to subpaths at build time and only the used components go into the bundle (npx yasinsensoy-native init adds it itself):

// babel.config.js
module.exports = {
  presets: ["module:@react-native/babel-preset"],
  plugins: ["@yasinsensoy/native/babel"],
};

Without the plugin the same result is achieved by importing from subpaths: import { Button } from "@yasinsensoy/native/button".

Components

APIs and utilities