Files
RN_Template/RN_TEMPLATE/ignite/templates/screen/NAMEScreen.tsx.ejs

30 lines
989 B
Plaintext
Raw Normal View History

2026-02-05 13:16:05 +08:00
---
destinationDir: app/screens
patches:
- path: "app/navigators/navigationTypes.ts"
replace: "// IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
insert: "<%= props.pascalCaseName %>: undefined\n // IGNITE_GENERATOR_ANCHOR_APP_STACK_PARAM_LIST"
---
import { FC } from "react"
import { ViewStyle } from "react-native"
import type { AppStackScreenProps } from "@/navigators/navigationTypes"
import { Screen } from "@/components/Screen"
import { Text } from "@/components/Text"
// import { useNavigation } from "@react-navigation/native"
interface <%= props.pascalCaseName %>ScreenProps extends AppStackScreenProps<"<%= props.pascalCaseName %>"> {}
export const <%= props.pascalCaseName %>Screen: FC<<%= props.pascalCaseName %>ScreenProps> = () => {
// Pull in navigation via hook
// const navigation = useNavigation()
return (
<Screen style={$root} preset="scroll">
<Text text="<%= props.camelCaseName %>" />
</Screen>
)
}
const $root: ViewStyle = {
flex: 1,
}