Skip to content

Commit

Permalink
Prettify
Browse files Browse the repository at this point in the history
  • Loading branch information
charpeni committed Sep 2, 2019
1 parent 952ca7f commit 7fe538d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/animations.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { Animated, Text, View } from 'react-native';
const FadeInView = (props) => {
const [fadeAdmin] = useState(new Animated.Value(0)) // Initial value for opacity: 0
React.useEffect(() => {
Animated.timing(
fadeAdmin,
Expand Down
3 changes: 1 addition & 2 deletions docs/backhandler.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ tvOS: Detect presses of the menu button on the TV remote. (Still to be implement

iOS: Not applicable.

The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called.
Beware: If your app shows an opened `Modal`, BackHandler will not publish any events ([see `Modal` docs](https://facebook.github.io/react-native/docs/modal#onrequestclose)).
The event subscriptions are called in reverse order (i.e. last registered subscription first), and if one subscription returns true then subscriptions registered earlier will not be called. Beware: If your app shows an opened `Modal`, BackHandler will not publish any events ([see `Modal` docs](https://facebook.github.io/react-native/docs/modal#onrequestclose)).

Example:

Expand Down
3 changes: 2 additions & 1 deletion docs/hermes.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ title: Using Hermes

First, ensure you're using at least version 0.60.4 of React Native. If you're upgrading an existing app ensure everything works before trying to switch to Hermes.

> ## Note for Windows users.
> ## Note for Windows users.
>
> Hermes requires [Microsoft Visual C++ 2015 Redistributable](https://www.microsoft.com/en-us/download/details.aspx?id=48145)
Edit your `android/app/build.gradle` file and make the change illustrated below:
Expand Down
6 changes: 3 additions & 3 deletions docs/layoutanimation.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ Note that in order to get this to work on **Android** you need to set the follow

```js
if (Platform.OS === 'android') {
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
if (UIManager.setLayoutAnimationEnabledExperimental) {
UIManager.setLayoutAnimationEnabledExperimental(true);
}
}
```

Expand Down
2 changes: 1 addition & 1 deletion docs/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ project.ext.react = [
]
```

> ***Note***: If you are using [Hermes JS Engine](https://github.com/facebook/hermes), you do not need RAM bundles. When loading the bytecode, `mmap` ensures that the entire file is not loaded.
> **_Note_**: If you are using [Hermes JS Engine](https://github.com/facebook/hermes), you do not need RAM bundles. When loading the bytecode, `mmap` ensures that the entire file is not loaded.
### Configure Preloading and Inline Requires

Expand Down
1 change: 0 additions & 1 deletion docs/stylesheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ const styles = StyleSheet.create({

---


### `absoluteFill` vs. `absoluteFillObject`

Currently, there is no difference between using `absoluteFill` vs. `absoluteFillObject` as you can see in the [source code](https://github.com/facebook/react-native/blob/master/Libraries/StyleSheet/StyleSheet.js#L255)
7 changes: 2 additions & 5 deletions docs/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@ id: typescript
title: Using TypeScript with React Native
---

[TypeScript][ts] is a language which extends JavaScript by adding type definitions, much like [Flow][flow].
While React Native is built in Flow, it supports both TypeScript _and_ Flow by default.
[TypeScript][ts] is a language which extends JavaScript by adding type definitions, much like [Flow][flow]. While React Native is built in Flow, it supports both TypeScript _and_ Flow by default.

## Getting Started with TypeScript

Expand Down Expand Up @@ -38,7 +37,6 @@ yarn add typescript @types/jest @types/react @types/react-native @types/react-te
npm install --save-dev @types/jest @types/react @types/react-native @types/react-test-renderer
```


2. Add a TypeScript config file. Create a `tsconfig.json` in the root of your project:

```json
Expand Down Expand Up @@ -79,8 +77,7 @@ module.exports = {

## How TypeScript and React Native works

Out of the box, transforming your files to JavaScript works via the same [Babel infrastructure][babel] as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are [one or two caveats][babel-7-caveats]
to using Babel instead of TypeScript.
Out of the box, transforming your files to JavaScript works via the same [Babel infrastructure][babel] as a non-TypeScript React Native project. We recommend that you use the TypeScript compiler only for type checking. If you have existing TypeScript code being ported to React Native, there are [one or two caveats][babel-7-caveats] to using Babel instead of TypeScript.

## What does React Native + TypeScript look like

Expand Down

0 comments on commit 7fe538d

Please sign in to comment.