Skip to content

Instantly share code, notes, and snippets.

@bryanltobing
Created April 16, 2024 10:08
Show Gist options
  • Save bryanltobing/0559a90089f5e79d6a750e74970aa185 to your computer and use it in GitHub Desktop.
Save bryanltobing/0559a90089f5e79d6a750e74970aa185 to your computer and use it in GitHub Desktop.
Changing Expo Router Entry Point
{
"main": "index.tsx",
}
@bryanltobing
Copy link
Author

First set package.json main to index.tsx

Then create index.tsx file the same level as your package.json

and inside index.tsx

import 'expo-router/entry';

@bryanltobing
Copy link
Author

This is useful if you want to set initiator or side effect before entering expo router

+  import "react-native-gesture-handler";
import 'expo-router/entry';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment