π Understanding the file structure of T4 App
For code within the /packages/app
and /packages/ui
directory, you can target both web, native, or both at the same time.
π― How targeting React platforms works in T4 App
For a given file name,
.native.tsx
targets Expo/React Native.web.tsx
targets Next.js/React.tsx
is shared across both
Using this approach, T4 app can share as much code as possible between web and native, while still allowing for platform specific code.
π² How to add a new screen
-
Create a new folder in
/packages/app/features
with your screen name. -
Create a new file in the folder called
screen.tsx
. -
Import the screen in your
next
andexpo
projects.