π 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.tsxtargets Expo/React Native.web.tsxtargets Next.js/React.tsxis 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/featureswith your screen name. -
Create a new file in the folder called
screen.tsx. -
Import the screen in your
nextandexpoprojects.