Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/christoph-jerolimov/react-native-with-typescript
react-native example project with TypeScript configuration
https://github.com/christoph-jerolimov/react-native-with-typescript
react-native typescript
Last synced: about 2 months ago
JSON representation
react-native example project with TypeScript configuration
- Host: GitHub
- URL: https://github.com/christoph-jerolimov/react-native-with-typescript
- Owner: christoph-jerolimov
- Created: 2018-05-09T11:46:43.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-09T20:39:01.000Z (over 6 years ago)
- Last Synced: 2024-11-25T12:16:12.979Z (about 2 months ago)
- Topics: react-native, typescript
- Language: Objective-C
- Homepage:
- Size: 501 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-native example project with TypeScript configuration
[![Build Status](https://travis-ci.org/jerolimov/react-native-with-typescript.svg?branch=master)](https://travis-ci.org/jerolimov/react-native-with-typescript)
This project contains an "bare" [react-native](http://facebook.github.io/react-native/)" projects
with enabled [TypeScript](https://www.typescriptlang.org/) configuration.## Step by step
The setup introduction is a shorter version of the official
[react-native with typescript documentation](https://github.com/Microsoft/TypeScript-React-Native-Starter) by Microsoft.* Create your react-native app:
* Run `react-native init Tutorial`
* Add TypeScript runtime.
* With npm: `npm install --save-dev typescript react-native-typescript-transformer ts-jest tslint`
* Alternative with yarn: `yarn add --dev typescript react-native-typescript-transformer ts-jest tslint`
* Add TypeScript type definitions.
* With npm: `npm install --save-dev @types/react @types/react-native @types/jest @types/react-test-renderer`
* Alternative with yarn: `yarn add --dev @types/react @types/react-native @types/jest @types/react-test-renderer`
* Generate [tsconfig.json](./tsconfig.json)
* by running `yarn tsc --init --pretty --jsx react`
* and enabling `allowSyntheticDefaultImports`
* Add `.jest` to `.gitignore`## Prettier
* Add dependency
* With npm: `npm install --save-dev prettier`
* Alternative with yarn: `yarn add --dev prettier`
* Add a prettier configuration
* For example a [.prettierrc.js](.prettierrc.js)