Today, I released version 2.0.0 (for React Native v0.74.0) of react-native-awesome-template, a simplified starter template for React Native. This template aims to enhance your app development experience by providing some configurations that helps you make fewer mistakes during the development process, specifically before committing or pushing to your project repository.
Introduction
When developing a real-world application, more careful consideration is required. This becomes even more apparent when a team, comprising developers with varying levels of expertise, works on a project.
Whether collectively or individually, maintaining the application necessitates adherence to specific rules to uphold project quality and minimize issues. Therefore, the purpose of this template, which centers on the development setup, is to aid in achieving the goal by providing essential configuration and addressing concerns, ultimately resulting in a better product.
Features
🐶 Configuring husky, a popular Git hook tool, simplifies the setup and management of pre-commit hooks. Currently, pre-commit, pre-push, and commit-msg hooks have configured.
💅 Configuring lint-staged allows for code linting before committing, ensuring that no errors make their way into the repository and enforcing consistent code style.
✍️ Configuring commitlint enables linting of commit messages, enforcing a consistent format that promotes clarity and understanding the changes made to your project.
🧹 Removing logs in production mode improves performance and prevents potential concerns that may arise from logging.
🗂️ Setting up configuration for paths with the @/ absolute prefix provides a better and more convenient experience when importing files.
Installation (Create New Project)
Step 1
npx react-native init MyApp --template react-native-awesome-template
Or specific version
npx react-native init MyApp --template react-native-awesome-template@1.6.0
Step 2
On the terminal in the project path run the following command to initialize Husky:
yarn prepare
//or
npm run prepare
I hope you find this template useful!
Check it out on GitHub: react-native-awesome-template
Top comments (0)