Skip to content

sunshihao/react-native-template-typescript

 
 

Repository files navigation

👾 React Native Template TypeScript · npm Travis

Clean and minimalist React Native template for a quick start with TypeScript.

Header

This template can be used with the React Native CLI, which means it doesn't mess with the platform specific files. Instead of including a lot of dependencies, my aim when creating this template was to provide a very easy and minimalist way to start your React Native project with TypeScript. Of course you can always include other dependencies as you need them.

⭐ Features

  • Seamless integration with the React Native CLI! ✨
  • Consistent with the default React Native template (no additional stuff)
  • React Native TypeScript transformer directly integrated into the packager (no separate process for tsc)
  • Unit testing in TypeScript with TS Jest
  • Always latest dependencies 🙌

▶️ Quick Start

react-native init MyApp --template typescript
cd MyApp
node setup.js

❓ FAQ

What is included in this template?

This template always uses the latest versions of the dependencies at the time when the setup script (node setup.js) is being executed. This means you don't have to worry about old versions.

Lots of ❤️ and credits to the owners and maintainers of those packages.

Why the setup script?

The React Native CLI supports automatic installation of production dependencies only. Since TypeScript and the other dependencies are dev dependencies, the setup script is being used to install those. It also takes care of obsolete files like the .flowconfig and the setup.js itself after the setup.

How will this template affect the React Native CLI workflow?

The React Native CLI will do everything just as without a template and afterwards overwrite the files with the ones from this template. This means you don't have to worry about incompatibility issues with later React Native upgrades.

Does debugging work too?

Yes it does. Some users reported that they got an error about relative paths when they tried to debug inside Visual Studio Code. In this case check out the fix by Mo Mac.

🌐 Links

💻 Contributing

Contributions are very welcome. Please check out the contributing document.

Donations

I created this project in my spare time because I enjoy coding. Of course you can support me by buying me a coffee if you wish. ☕ 😌

About

👾 Clean and minimalist React Native template for a quick start with TypeScript.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 53.6%
  • TypeScript 46.4%