Typescript React Native template with Server Side Rendering (SSR) using Razzle and routing + navigation with React Navigation.
🌟 Features
- Consistent with the default React Native template
- Target Android, iOS and Web with SSR
- Use Typescript out of the box
- Use
.web.js
or.web.tsx
file - Use a new
.ssr.tsx
or.ssr.js
file extension for SSR-only - Working React Navigation
- Working Razzle with SSR
- Elegant usage directly within the React Native CLI
- Inspired by a sample by @jaredpalmer
- Based on the minimalistic
react-native-template-typescript
⏩ Usage
⚠️ This is tested and working with node v12 (LTS), latest versions don't seem to work. #6 contains more info.
Note on the legacy CLI
There seems to be quite some confusion about the legacy CLI. This template only works with the new CLI. Make sure you have uninstalled the legacy react-native-cli
first (npm uninstall -g react-native-cli
), for the command to work. If you wish to not use npx
, you can also install the new CLI globally (npm i -g @react-native-community/cli
or yarn global add @react-native-community/cli
).
Further information can be found here: https://github.com/react-native-community/cli#about
react-native@0.64.0
or higher
# Setup the template
npx react-native init MyApp --template @lezzmo/razzle-treact-natigation
# Run web
yarn web
npm run web
# Run Android
yarn android
npm run android
# Run iOS
yarn ios
npm run ios
🔍 What's wrong with the name?
No, it's not a typo. It's properly named. The name comes from the weird combination of:
- Razzle
- (T)ypescript
- (React Na)tive
- React Naviga(tion)
I know. Creative, uh?
💻 Contributing
Contributions are very welcome. Please check out the contributing document.
📚 License
This project is MIT licensed.
Copyright (c) 2019 Emin Khateeb, Sinuhé Coronel