Installation
Pick a client and clone the repository into its skills directory.
Installation
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
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.
Wybierz typ ekranu: prosty (bez GraphQL) lub Relay (z GraphQL). Dla ekranu prostego skill utworzy plik w
/src/app/Scenes/FeatureName/ScreenName.tsxna bazie szablonuassets/simple-screen-template.tsx. Dla ekranu Relay użyje szablonuassets/relay-screen-template.tsx.Skill automatycznie zarejestruje trasę w
/src/app/Navigation/routes.tsx. Dla ekranu Relay doda polaqueriesiprepareVariables. Upewnij się, że kolejność tras jest poprawna (trasy szczegółowe przed ogólnymi).Napisz test dla nowego ekranu, korzystając ze skilla
/eigen-testing. Uruchom testy poleceniemyarn test [plik testowy].Uruchom linter (
yarn lint [zmienione pliki]) i formatter (yarn prettier -w [zmienione pliki]), aby upewnić się, że kod spełnia standardy projektu.Jeśli pracujesz na Androidzie i chcesz włączyć deep linking, dodaj trasę do
src/main/AndroidManifest.xmlw sekcji<data android:pathPrefix="/my-screen" />.