Skip to content
This repository has been archived by the owner on Jun 16, 2023. It is now read-only.

Commit

Permalink
docs(expo): explain how to migrate to and from expo camera module (#1605
Browse files Browse the repository at this point in the history
)
  • Loading branch information
sibelius authored Jun 4, 2018
1 parent c3696c5 commit 4a9322c
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 6 deletions.
8 changes: 2 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
### Warning
RCTCamera is **DEPRECATED** on v1.0.0 follow our migration guide here https://github.com/react-native-community/react-native-camera/blob/master/docs/migration.md

### Gradle 3
This package required Gradle 3, follow this migration guide https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration
RCTCamera is **DEPRECATED** on v1.0.0 follow our [Migration guide](https://github.com/react-native-community/react-native-camera/blob/master/docs/migration.md)

### Which implementation are you using

Expand All @@ -14,7 +11,7 @@ This package required Gradle 3, follow this migration guide https://developer.an
3.

### Does it work with Expo Camera?
RNCamera is based on Expo Camera, if this does not work with Expo Camera it won't work with RNCamera as well.
Check usage with Expo - https://github.com/react-native-community/react-native-camera/blob/master/docs/Expo_Usage.md
You should open an issue there as well, so we can cooperate in a solution.

### Expected behaviour
Expand All @@ -24,7 +21,6 @@ Tell us what should happen
Tell us what happens instead

### Environment
- **Node.js version**:
- **React Native version**:
- **React Native platform + platform version**: iOS 9.0, Android 5.0, etc

Expand Down
31 changes: 31 additions & 0 deletions docs/Expo_Usage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# [Expo](https://expo.io/) Usage

RNCamera of react-native-camera is heavyly based on Expo camera module. Thanks @aalices and Expo for the great work.

So you don't need to use **react-native-camera** if you have the following config:

- If you are using [Expo](https://expo.io)
- If you are using [create-react-native-app](https://github.com/react-community/create-react-native-app)
- If you eject a [create-react-native-app](https://github.com/react-community/create-react-native-app) app and are using [ExpoKit](https://docs.expo.io/versions/latest/expokit/expokit)

## How to migrate from Expo to react-native-camera

If you decide to eject without using ExpoKit, you can follow react-native-camera installation instructions and just change the usage of your Camera component to RNCamera:

```diff
- import { Camera } from 'expo';
+ import { RNCamera } from 'react-native-camera';

- <Camera
+ <RNCamera
```

## How to migrate from react-native-camera to Expo Camera Module
```diff
- import { RNCamera } from 'react-native-camera';
+ import { Camera } from 'expo';

- <RNCamera
+ <Camera
```

0 comments on commit 4a9322c

Please sign in to comment.