├── .eslintrc.js ├── .gitignore ├── .vscode └── launch.json ├── README.md ├── apps ├── docs │ ├── .eslintrc.js │ ├── README.md │ ├── app │ │ ├── favicon.ico │ │ ├── globals.css │ │ ├── layout.tsx │ │ ├── page.module.css │ │ └── page.tsx │ ├── base.json │ ├── next-env.d.ts │ ├── next.config.js │ ├── next.js │ ├── nextjs.json │ ├── package.json │ ├── public │ │ ├── circles.svg │ │ ├── next.svg │ │ ├── turborepo.svg │ │ └── vercel.svg │ └── tsconfig.json ├── expo-router-example │ ├── .gitignore │ ├── app.d.ts │ ├── app.json │ ├── app │ │ ├── (tabs) │ │ │ ├── _layout.tsx │ │ │ ├── index.tsx │ │ │ └── two.tsx │ │ ├── +html.tsx │ │ ├── +not-found.tsx │ │ ├── _layout.tsx │ │ └── modal.tsx │ ├── assets │ │ ├── fonts │ │ │ └── SpaceMono-Regular.ttf │ │ └── images │ │ │ ├── adaptive-icon.png │ │ │ ├── favicon.png │ │ │ ├── icon.png │ │ │ └── splash.png │ ├── babel.config.js │ ├── components │ │ ├── EditScreenInfo.tsx │ │ ├── ExternalLink.tsx │ │ ├── StyledText.tsx │ │ ├── Themed.tsx │ │ ├── __tests__ │ │ │ └── StyledText-test.js │ │ ├── button │ │ │ ├── button.expo-web.tsx │ │ │ └── button.tsx │ │ ├── useClientOnlyValue.ts │ │ ├── useClientOnlyValue.web.ts │ │ ├── useColorScheme.ts │ │ └── useColorScheme.web.ts │ ├── constants │ │ └── Colors.ts │ ├── global.css │ ├── metro.config.js │ ├── package.json │ ├── tailwind.config.js │ ├── tsconfig.json │ └── utils │ │ ├── font-plugin-expo.js │ │ ├── font-plugin-expo.web.js │ │ └── font-plugin.js ├── mobile │ ├── .gitignore │ ├── App.tsx │ ├── app.json │ ├── assets │ │ ├── adaptive-icon.png │ │ ├── favicon.png │ │ ├── icon.png │ │ ├── splash.png │ │ └── test.png │ ├── babel.config.js │ ├── base.json │ ├── expo.json │ ├── index.js │ ├── metro.config.js │ ├── package.json │ └── tsconfig.json └── web │ ├── .eslintrc.js │ ├── README.md │ ├── app │ ├── Second │ │ └── page.tsx │ ├── favicon.ico │ ├── globals.css │ ├── layout.tsx │ ├── page.module.css │ ├── page.tsx │ └── registry.tsx │ ├── base.json │ ├── components │ ├── button.next-web.tsx │ ├── button.tsx │ └── ui │ │ └── gluestack-ui-provider │ │ ├── config.ts │ │ ├── index.tsx │ │ └── index.web.tsx │ ├── gluestack-ui.config.json │ ├── nativewind-env.d.ts │ ├── next-env.d.ts │ ├── next.config.js │ ├── next.js │ ├── next.json │ ├── package.json │ ├── postcss.config.js │ ├── public │ ├── assets │ │ └── images │ │ │ └── splash.png │ ├── circles.svg │ ├── next.svg │ ├── test.png │ ├── turborepo.svg │ └── vercel.svg │ ├── tailwind.config.js │ └── tsconfig.json ├── base.json ├── library.js ├── package.json ├── packages ├── babel-plugin-universal-image │ ├── README.md │ ├── package.json │ ├── src │ │ └── index.js │ └── turbo │ │ └── generators │ │ ├── config.ts │ │ └── templates │ │ └── component.hbs ├── fonts-loader │ ├── .eslintrc.js │ ├── README.md │ ├── package.json │ └── src │ │ ├── index.js │ │ └── index.next-web.js ├── fonts-plugin │ ├── .eslintrc.js │ ├── README.md │ ├── helpers │ │ └── index.js │ ├── package.json │ └── src │ │ ├── expo.js │ │ └── next.js ├── image-expo │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── webpack.config.js ├── image-next │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── webpack.config.js ├── image │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ └── webpack.config.js ├── link-expo │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── link-next │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── link │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── metro-config │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ ├── index.ts │ │ └── resolver.ts │ ├── tsconfig.json │ └── tsconfig.lint.json ├── navigation │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── next-adapter │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ ├── index.ts │ │ └── utils.ts │ ├── tsconfig.json │ └── tsconfig.lint.json ├── router-expo │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── router-next │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js ├── router │ ├── .eslintrc.js │ ├── README.md │ ├── base.json │ ├── package.json │ ├── react-internal.js │ ├── react-library.json │ ├── src │ │ └── index.tsx │ ├── tsconfig.json │ ├── tsconfig.lint.json │ ├── turbo │ │ └── generators │ │ │ ├── config.ts │ │ │ └── templates │ │ │ └── component.hbs │ └── webpack.config.js └── utils │ ├── .npmignore │ ├── .npmrc │ ├── README.md │ ├── package.json │ ├── src │ ├── index.ts │ └── postinstall.js │ ├── tsconfig.json │ └── turbo │ └── generators │ ├── config.ts │ └── templates │ └── component.hbs ├── patches └── react-native-css-interop+0.0.36.patch ├── tsconfig.json ├── turbo.json └── yarn.lock /.eslintrc.js: -------------------------------------------------------------------------------- 1 | // This configuration only applies to the package manager root. 2 | /** @type {import("eslint").Linter.Config} */ 3 | module.exports = { 4 | ignorePatterns: ["apps/**", "packages/**"], 5 | extends: ["./library.js"], 6 | parser: "@typescript-eslint/parser", 7 | parserOptions: { 8 | project: true, 9 | }, 10 | }; 11 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # Dependencies 4 | node_modules 5 | .pnp 6 | .pnp.js 7 | 8 | # Local env files 9 | .env 10 | .env.local 11 | .env.development.local 12 | .env.test.local 13 | .env.production.local 14 | 15 | # Testing 16 | coverage 17 | 18 | # Turbo 19 | .turbo 20 | 21 | # Vercel 22 | .vercel 23 | 24 | # Build Outputs 25 | .next/ 26 | out/ 27 | build 28 | dist 29 | 30 | 31 | # Debug 32 | npm-debug.log* 33 | yarn-debug.log* 34 | yarn-error.log* 35 | 36 | # Misc 37 | .DS_Store 38 | *.pem 39 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "type": "react-native-ide", 9 | "request": "launch", 10 | "name": "React Native IDE panel", 11 | "ios": { 12 | "configuration": "Debug" 13 | }, 14 | "android": { 15 | "variant": "debug" 16 | }, 17 | "appRoot": "apps/expo-router-example/expo-router/entry" 18 | } 19 | ] 20 | } 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Introduction to Unitools 2 | 3 | Unitools is a group of tooling that aims to simplify the process of code sharing between `Next.js`, `Expo`, and `React Native` projects. It's a required and indispensable tool in the realm of cross-platform development today with more and more apps moving towards universal app development. Unitools provides a unified API for handling `images`, `links`, and `route navigation hooks` across all these platforms. 4 | 5 | ## Documentation 6 | 7 | You can find more details on [documentation website](https://unitools.geekyants.com/overview/introduction/). 8 | 9 | 10 | ## Why? 11 | 12 | The challenge of sharing code for navigation and images across platforms like Next.js and Expo has always been a significant hurdle for developers because of the fragmented APIs. These platforms, although powerful in their own right, have distinct structures and syntax, which creates an added layer of complexity when writing code. Unitools is designed to address this specific problem. By enabling seamless code sharing between these platforms, Unitools eliminates the need for developers to write separate sets of code, thus saving time and effort and allowing for a smoother workflow. 13 | 14 | ## How it is different? 15 | 16 | There are other tools in the market that attempt to solve the same problem, such as Solito. These tools, while offering much more features also adds a layer of complexities and learning curve. 17 | 18 | Unitools is designed to be simple and easy to use. It provides a unified API but only for your DX and rely on the bundler to use the actual platform specific code. This makes it easier to understand and use. 19 | 20 | ## What’s included? 21 | 22 | Each package contains three libraries. 23 | 24 | 1. Base package which exports the interface 25 | 2. Expo package 26 | 3. Next.js package 27 | 28 | Below are the packages we have created so far: 29 | 30 | - Link - A unified API for expo and next link 31 | - Image -A unified API for expo and next image 32 | - Router - A unified API for expo and next router 33 | -------------------------------------------------------------------------------- /apps/docs/.eslintrc.js: -------------------------------------------------------------------------------- 1 | /** @type {import("eslint").Linter.Config} */ 2 | module.exports = { 3 | root: true, 4 | extends: ["./next.js"], 5 | parser: "@typescript-eslint/parser", 6 | parserOptions: { 7 | project: true, 8 | }, 9 | }; 10 | -------------------------------------------------------------------------------- /apps/docs/README.md: -------------------------------------------------------------------------------- 1 | ## Getting Started 2 | 3 | First, run the development server: 4 | 5 | ```bash 6 | yarn dev 7 | ``` 8 | 9 | Open [http://localhost:3001](http://localhost:3001) with your browser to see the result. 10 | 11 | You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. 12 | 13 | To create [API routes](https://nextjs.org/docs/app/building-your-application/routing/router-handlers) add an `api/` directory to the `app/` directory with a `route.ts` file. For individual endpoints, create a subfolder in the `api` directory, like `api/hello/route.ts` would map to [http://localhost:3001/api/hello](http://localhost:3001/api/hello). 14 | 15 | ## Learn More 16 | 17 | To learn more about Next.js, take a look at the following resources: 18 | 19 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. 20 | - [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial. 21 | 22 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome! 23 | 24 | ## Deploy on Vercel 25 | 26 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js. 27 | 28 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details. 29 | -------------------------------------------------------------------------------- /apps/docs/app/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GeekyAnts/unitools/476813b80309b02f9e9fbdf78561c973af086b3e/apps/docs/app/favicon.ico -------------------------------------------------------------------------------- /apps/docs/app/globals.css: -------------------------------------------------------------------------------- 1 | :root { 2 | --max-width: 1100px; 3 | --border-radius: 12px; 4 | --font-mono: ui-monospace, Menlo, Monaco, "Cascadia Mono", "Segoe UI Mono", 5 | "Roboto Mono", "Oxygen Mono", "Ubuntu Monospace", "Source Code Pro", 6 | "Fira Mono", "Droid Sans Mono", "Courier New", monospace; 7 | 8 | --foreground-rgb: 255, 255, 255; 9 | --background-start-rgb: 0, 0, 0; 10 | --background-end-rgb: 0, 0, 0; 11 | 12 | --callout-rgb: 20, 20, 20; 13 | --callout-border-rgb: 108, 108, 108; 14 | --card-rgb: 100, 100, 100; 15 | --card-border-rgb: 200, 200, 200; 16 | 17 | --glow-conic: conic-gradient( 18 | from 180deg at 50% 50%, 19 | #2a8af6 0deg, 20 | #a853ba 180deg, 21 | #e92a67 360deg 22 | ); 23 | } 24 | 25 | * { 26 | box-sizing: border-box; 27 | padding: 0; 28 | margin: 0; 29 | } 30 | 31 | html, 32 | body { 33 | max-width: 100vw; 34 | overflow-x: hidden; 35 | } 36 | 37 | body { 38 | color: rgb(var(--foreground-rgb)); 39 | background: linear-gradient( 40 | to bottom, 41 | transparent, 42 | rgb(var(--background-end-rgb)) 43 | ) 44 | rgb(var(--background-start-rgb)); 45 | } 46 | 47 | a { 48 | color: inherit; 49 | text-decoration: none; 50 | } 51 | -------------------------------------------------------------------------------- /apps/docs/app/layout.tsx: -------------------------------------------------------------------------------- 1 | import "./globals.css"; 2 | import type { Metadata } from "next"; 3 | // import { Inter } from "next/font/google"; 4 | 5 | // const inter = Inter({ subsets: ["latin"] }); 6 | 7 | export const metadata: Metadata = { 8 | title: "Create Turborepo", 9 | description: "Generated by create turbo", 10 | }; 11 | 12 | export default function RootLayout({ 13 | children, 14 | }: { 15 | children: React.ReactNode; 16 | }): JSX.Element { 17 | return ( 18 | 19 | {children} 20 | 21 | ); 22 | } 23 | -------------------------------------------------------------------------------- /apps/docs/base.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Default", 4 | "compilerOptions": { 5 | "declaration": true, 6 | "declarationMap": true, 7 | "esModuleInterop": true, 8 | "incremental": false, 9 | "isolatedModules": true, 10 | "lib": ["es2022", "DOM", "DOM.Iterable"], 11 | "module": "NodeNext", 12 | "moduleDetection": "force", 13 | "moduleResolution": "NodeNext", 14 | "noUncheckedIndexedAccess": true, 15 | "resolveJsonModule": true, 16 | "skipLibCheck": true, 17 | "strict": true, 18 | "target": "ES2022" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /apps/docs/next-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | /// 3 | 4 | // NOTE: This file should not be edited 5 | // see https://nextjs.org/docs/basic-features/typescript for more information. 6 | -------------------------------------------------------------------------------- /apps/docs/next.config.js: -------------------------------------------------------------------------------- 1 | /** @type {import('next').NextConfig} */ 2 | module.exports = { 3 | transpilePackages: [ 4 | "@unitools/link", 5 | "@unitools/image", 6 | "@unitools/navigation", 7 | ], 8 | }; 9 | -------------------------------------------------------------------------------- /apps/docs/next.js: -------------------------------------------------------------------------------- 1 | const { resolve } = require("node:path"); 2 | 3 | const project = resolve(process.cwd(), "tsconfig.json"); 4 | 5 | /** @type {import("eslint").Linter.Config} */ 6 | module.exports = { 7 | extends: [ 8 | "eslint:recommended", 9 | "prettier", 10 | require.resolve("@vercel/style-guide/eslint/next"), 11 | "eslint-config-turbo", 12 | ], 13 | globals: { 14 | React: true, 15 | JSX: true, 16 | }, 17 | env: { 18 | node: true, 19 | browser: true, 20 | }, 21 | plugins: ["only-warn"], 22 | settings: { 23 | "import/resolver": { 24 | typescript: { 25 | project, 26 | }, 27 | }, 28 | }, 29 | ignorePatterns: [ 30 | // Ignore dotfiles 31 | ".*.js", 32 | "node_modules/", 33 | ], 34 | overrides: [{ files: ["*.js?(x)", "*.ts?(x)"] }], 35 | }; 36 | -------------------------------------------------------------------------------- /apps/docs/nextjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://json.schemastore.org/tsconfig", 3 | "display": "Next.js", 4 | "extends": "./base.json", 5 | "compilerOptions": { 6 | "plugins": [{ "name": "next" }], 7 | "module": "ESNext", 8 | "moduleResolution": "Bundler", 9 | "allowJs": true, 10 | "jsx": "preserve", 11 | "noEmit": true 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /apps/docs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "docs", 3 | "version": "1.0.0", 4 | "private": true, 5 | "scripts": { 6 | "dev": "next dev --port 3001", 7 | "build": "next build", 8 | "start": "next start", 9 | "lint": "eslint . --max-warnings 0" 10 | }, 11 | "dependencies": { 12 | "next": "^14.1.1", 13 | "react": "^18.2.0", 14 | "react-dom": "^18.2.0" 15 | }, 16 | "devDependencies": { 17 | "@next/eslint-plugin-next": "^14.1.1", 18 | "@types/eslint": "^8.56.5", 19 | "@types/node": "^20.11.24", 20 | "@types/react": "^18.2.61", 21 | "@types/react-dom": "^18.2.19", 22 | "eslint": "^8.57.0", 23 | "typescript": "^5.3.3" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /apps/docs/public/circles.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /apps/docs/public/next.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/public/vercel.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /apps/docs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./nextjs.json", 3 | "compilerOptions": { 4 | "plugins": [ 5 | { 6 | "name": "next" 7 | } 8 | ] 9 | }, 10 | "include": [ 11 | "next-env.d.ts", 12 | "next.config.js", 13 | "**/*.ts", 14 | "**/*.tsx", 15 | ".next/types/**/*.ts" 16 | ], 17 | "exclude": [ 18 | "node_modules" 19 | ] 20 | } -------------------------------------------------------------------------------- /apps/expo-router-example/.gitignore: -------------------------------------------------------------------------------- 1 | # Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files 2 | 3 | # dependencies 4 | node_modules/ 5 | 6 | # Expo 7 | .expo/ 8 | dist/ 9 | web-build/ 10 | 11 | # Native 12 | *.orig.* 13 | *.jks 14 | *.p8 15 | *.p12 16 | *.key 17 | *.mobileprovision 18 | 19 | # Metro 20 | .metro-health-check* 21 | 22 | # debug 23 | npm-debug.* 24 | yarn-debug.* 25 | yarn-error.* 26 | 27 | # macOS 28 | .DS_Store 29 | *.pem 30 | 31 | # local env files 32 | .env*.local 33 | 34 | # typescript 35 | *.tsbuildinfo 36 | 37 | # @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb 38 | # The following patterns were generated by expo-cli 39 | 40 | expo-env.d.ts 41 | # @end expo-cli -------------------------------------------------------------------------------- /apps/expo-router-example/app.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /apps/expo-router-example/app.json: -------------------------------------------------------------------------------- 1 | { 2 | "expo": { 3 | "name": "expo-router-example", 4 | "slug": "expo-router-example", 5 | "version": "1.0.0", 6 | "orientation": "portrait", 7 | "icon": "./assets/images/icon.png", 8 | "scheme": "myapp", 9 | "userInterfaceStyle": "automatic", 10 | "splash": { 11 | "image": "./assets/images/splash.png", 12 | "resizeMode": "contain", 13 | "backgroundColor": "#ffffff" 14 | }, 15 | "assetBundlePatterns": [ 16 | "**/*" 17 | ], 18 | "ios": { 19 | "supportsTablet": true 20 | }, 21 | "android": { 22 | "adaptiveIcon": { 23 | "foregroundImage": "./assets/images/adaptive-icon.png", 24 | "backgroundColor": "#ffffff" 25 | } 26 | }, 27 | "web": { 28 | "bundler": "metro", 29 | "output": "static", 30 | "favicon": "./assets/images/favicon.png" 31 | }, 32 | "plugins": [ 33 | "expo-router", 34 | "expo-font" 35 | ], 36 | "experiments": { 37 | "typedRoutes": true 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /apps/expo-router-example/app/(tabs)/_layout.tsx: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import FontAwesome from "@expo/vector-icons/FontAwesome"; 3 | import { Tabs } from "expo-router"; 4 | import Link from "@unitools/link"; 5 | import { Pressable } from "react-native"; 6 | 7 | import Colors from "@/constants/Colors"; 8 | import { useColorScheme } from "@/components/useColorScheme"; 9 | import { useClientOnlyValue } from "@/components/useClientOnlyValue"; 10 | // You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/ 11 | function TabBarIcon(props: { 12 | name: React.ComponentProps["name"]; 13 | color: string; 14 | }) { 15 | return ; 16 | } 17 | 18 | export default function TabLayout() { 19 | const colorScheme = useColorScheme(); 20 | 21 | return ( 22 | 30 | , 35 | headerRight: () => ( 36 | 37 | 38 | {({ pressed }) => ( 39 | 45 | )} 46 | 47 | 48 | ), 49 | }} 50 | /> 51 | , 56 | }} 57 | /> 58 | 59 | ); 60 | } 61 | -------------------------------------------------------------------------------- /apps/expo-router-example/app/(tabs)/index.tsx: -------------------------------------------------------------------------------- 1 | import { Pressable, StyleSheet } from "react-native"; 2 | 3 | import EditScreenInfo from "@/components/EditScreenInfo"; 4 | import { Text, View } from "@/components/Themed"; 5 | import Link from "@unitools/link"; 6 | import { useNavigation } from "expo-router"; 7 | import Image from "@unitools/image"; 8 | import { Image as ExpoImage } from "expo-image"; 9 | import type { ImageProps } from "expo-image"; 10 | import { useRouter } from "@unitools/router"; 11 | import Button from "@/components/button/button"; 12 | 13 | export default function TabOneScreen() { 14 | let a: ImageProps = {}; 15 | 16 | const router = useRouter(); 17 | const blurhash = 18 | "|rF?hV%2WCj[ayj[a|j[az_NaeWBj@ayfRayfQfQM{M|azj[azf6fQfQfQIpWXofj[ayj[j[fQayWCoeoeaya}j[ayfQa{oLj?j[WVj[ayayj[fQoff7azayj[ayj[j[ayofayayayj[fQj[ayayj[ayfjj[j[ayjuayj["; 19 | 20 | return ( 21 | 22 | 31 | Go to Tab two 32 | 33 | Tab One 34 | 39 | 40 | Go to tabs 41 | dkfjndkb 49 |