Skip to main content
The screen generator creates a screen implementation inside an existing package, exports it, and writes a route scaffold when requested.

Command

Options

When route is omitted, the normalized screen filename is used as the route filename.

Generated files

For the example above, the generator:
  1. Verifies that packages/chat/src/index.ts exists.
  2. Creates packages/chat/src/screens/conversation.tsx.
  3. Exports ./screens/conversation from packages/chat/src/index.ts.
  4. Creates a default-exporting route at apps/mobile/src/app/(modal)/conversation.tsx.
  5. Stops rather than overwriting an existing screen or route.
The generated route imports ConversationScreen from @amisi-mobile-starter/chat and exports it as the route default.
Expo Router is configured with apps/mobile/app as its active route root, but the current generator writes to apps/mobile/src/app. The generated route is inactive. Move or recreate it under apps/mobile/app, then remove the inactive generated route before using the screen.

Complete the screen

The generated implementation uses basic React Native Text and View primitives with inline styles. Before shipping it:
  • use shared components from @amisi-mobile-starter/ui
  • use theme tokens and the project styling convention
  • move user-facing text into @amisi-mobile-starter/i18n
  • add typed analytics interactions
  • connect domain state through the owning package
  • add loading, empty, success, and error states
  • add tests and run bun run verify

Route example after correction

Place that file at apps/mobile/app/(modal)/conversation.tsx.

Navigation guide

Review the active Expo Router groups and access-gate behavior.