You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This document contains checklists to be done before releasing new versions.
4
+
5
+
**TODO**: This is not an exhaustive list. At the moment it contains easy-to-forget steps, so that they would not be forgotten.
6
+
7
+
## Verify .flowconfig is up to date after updating expo-sdk
8
+
9
+
After upgrading the [expo-sdk](https://github.com/exponent/exponent-sdk) version (which transitively updates the `react-native` version), ensure that the [.flowconfig](react-native-scripts/template/.flowconfig) template is up to date.
10
+
11
+
Easiest way to do this, is:
12
+
1. Use [this handy chart](VERSIONS.md) to find out the underlying `react-native` versions of the old and new `expo-sdk`.
13
+
2. Get `react-native` .flowconfig changeset in the React Native repo with `git diff tags/v0.41.0 tags/v0.42.0 -- local-cli/templates/HelloWorld/_flowconfig`
14
+
3. If there are changes, land diff to CRNA [.flowconfig](react-native-scripts/template/.flowconfig) template
15
+
4. To test, follow instructions in [README/Adding Flow](react-native-scripts/README.md#adding-flow) on a freshly generated project, and do `npm run flow` to ensure the process exits without error.
16
+
5. If there are new issues with third-party dependencies, fix them upstream or add necessary `[ignore]` fields to .flowconfig.
Copy file name to clipboardExpand all lines: react-native-scripts/template/README.md
+19
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@ Below you'll find information about performing common tasks. The most recent ver
12
12
*[npm run android](#npm-run-android)
13
13
*[npm run eject](#npm-run-eject)
14
14
*[Writing and Running Tests](#writing-and-running-tests)
15
+
*[Adding Flow](#adding-flow)
15
16
*[Customizing App Display Name and Icon](#customizing-app-display-name-and-icon)
16
17
*[Sharing and Deployment](#sharing-and-deployment)
17
18
*[Publishing to Expo's React Native Community](#publishing-to-expos-react-native-community)
@@ -69,6 +70,24 @@ To set an app icon, set the `expo.icon` key in `app.json` to be either a local p
69
70
70
71
This project is set up to use [jest](https://facebook.github.io/jest/) for tests. You can configure whatever testing strategy you like, but jest works out of the box. Create test files in directories called `__tests__` to have the files loaded by jest. See the [the template project](https://github.com/react-community/create-react-native-app/tree/master/react-native-scripts/template/__tests__) for an example test. The [jest documentation](https://facebook.github.io/jest/docs/getting-started.html) is also a wonderful resource, as is the [React Native testing tutorial](https://facebook.github.io/jest/docs/tutorial-react-native.html).
71
72
73
+
## Adding Flow
74
+
75
+
Flow is a static type checker that helps you write code with fewer bugs. Check out this [introduction to using static types in JavaScript](https://medium.com/@preethikasireddy/why-use-static-types-in-javascript-part-1-8382da1e0adb) if you are new to this concept.
76
+
77
+
React Native works with [Flow](http://flowtype.org/) out of the box, as long as your Flow version matches the one used in the version of React Native.
78
+
79
+
To add a local dependency to the correct Flow version to a Create React Native App project, follow these steps:
80
+
81
+
1. Find the Flow `[version]` at the bottom of the included [.flowconfig](.flowconfig)
82
+
2. Run `npm install --save-dev [email protected]` (or `yarn add --dev [email protected]`), where `x.y.z` is the .flowconfig version number.
83
+
3. Add `"flow": "flow"` to the `scripts` section of your `package.json`.
84
+
4. Add `// @flow` to any files you want to type check (for example, to `App.js`).
85
+
86
+
Now you can run `npm run flow` (or `yarn flow`) to check the files for type errors.
87
+
You can optionally use a plugin for your IDE for a better integrated experience.
88
+
89
+
To learn more about Flow, check out [its documentation](https://flowtype.org/).
90
+
72
91
## Sharing and Deployment
73
92
74
93
Create React Native App does a lot of work to make app setup and development simple and straightforward, but it's very difficult to do the same for deploying to Apple's App Store or Google's Play Store without relying on a hosted service.
0 commit comments