Toolverse
All skills

creating-screens

by artsy

Add new screens and routes to Eigen React Native app. Guides you through creating simple screens (no data fetching) or Relay screens (with GraphQL). Use this when adding screens, routes, or navigating components. Triggers on \

Installation

Pick a client and clone the repository into its skills directory.

Installation

Quick info

Author
artsy
Category
Mobile
Views
1

About this skill

Add new screens and routes to Eigen React Native app. Guides you through creating simple screens (no data fetching) or Relay screens (with GraphQL). Use this when adding screens, routes, or navigating components. Triggers on \

How to use

  1. Wyzwól skill poleceniem "add a screen", "create a new route", "add a Relay screen" lub "setup screen with data". Skill poprosi cię o potwierdzenie nazwy komponentu i żądanej trasy.

  2. Wybierz typ ekranu: prosty (bez GraphQL) lub Relay (z GraphQL). Dla ekranu prostego skill utworzy plik w /src/app/Scenes/FeatureName/ScreenName.tsx na bazie szablonu assets/simple-screen-template.tsx. Dla ekranu Relay użyje szablonu assets/relay-screen-template.tsx.

  3. Skill automatycznie zarejestruje trasę w /src/app/Navigation/routes.tsx. Dla ekranu Relay doda pola queries i prepareVariables. Upewnij się, że kolejność tras jest poprawna (trasy szczegółowe przed ogólnymi).

  4. Napisz test dla nowego ekranu, korzystając ze skilla /eigen-testing. Uruchom testy poleceniem yarn test [plik testowy].

  5. Uruchom linter (yarn lint [zmienione pliki]) i formatter (yarn prettier -w [zmienione pliki]), aby upewnić się, że kod spełnia standardy projektu.

  6. Jeśli pracujesz na Androidzie i chcesz włączyć deep linking, dodaj trasę do src/main/AndroidManifest.xml w sekcji <data android:pathPrefix="/my-screen" />.

Related skills