From 87349c112a72be4658bcefa194fd5d81db4d8fd6 Mon Sep 17 00:00:00 2001 From: Mateusz Zatorski Date: Wed, 7 Mar 2018 14:13:01 +0100 Subject: [PATCH] docs: fix instructions for expo (#271) --- docs/pages/1.getting-started.md | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/pages/1.getting-started.md b/docs/pages/1.getting-started.md index eca13d7..d94f2eb 100644 --- a/docs/pages/1.getting-started.md +++ b/docs/pages/1.getting-started.md @@ -11,13 +11,28 @@ Open a Terminal in your project's folder and run, yarn add react-native-paper ``` -If you're on a vanilla React Native project, you also need to install and link [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons). If you use CRNA or Expo, you don't need this step. +If you're on a vanilla React Native project, you also need to install and link [react-native-vector-icons](https://github.com/oblador/react-native-vector-icons). ```sh yarn add react-native-vector-icons react-native link react-native-vector-icons ``` +If you use CRNA or Expo, you don't need this step, but you will need to install `babel-preset-expo` as a dev dependency and add it to the `.babelrc` config: + +```sh +yarn add -D babel-preset-expo +``` + +**.babelrc** +```json +{ + "presets": [ + "expo" + ] +} +``` + ## Usage Wrap your root component in `Provider` from `react-native-paper`. If you have a vanilla React Native project, it's a good idea to add it in the component which is passed to `AppRegistry.registerComponent`. This will usually be in the `index.js` file. If you have a CRNA or Expo project, you can do this inside the exported component in the `App.js` file.