From bcd39f604f308ac146e3dcf12b14661a9e1ab7bf Mon Sep 17 00:00:00 2001
From: Charlie Cruzan <35579283+cruzach@users.noreply.github.com>
Date: Tue, 9 Jun 2020 17:56:18 -0400
Subject: [PATCH] [docs] random docs fixes to close old PRs (#8749)
---
docs/pages/introduction/managed-vs-bare.md | 28 +++++++++----------
docs/pages/tutorial/sharing.md | 18 +++++-------
.../unversioned/react-native/asyncstorage.md | 2 --
.../pages/workflow/android-studio-emulator.md | 6 ++--
.../unversioned/tutorial/sharing-simple.js | 2 +-
.../v37.0.0/tutorial/sharing-simple.js | 2 +-
6 files changed, 27 insertions(+), 31 deletions(-)
diff --git a/docs/pages/introduction/managed-vs-bare.md b/docs/pages/introduction/managed-vs-bare.md
index 8acf2f104b255e..f040916ed24098 100644
--- a/docs/pages/introduction/managed-vs-bare.md
+++ b/docs/pages/introduction/managed-vs-bare.md
@@ -5,14 +5,14 @@ sidebar_title: Workflows
The two approaches to building applications with Expo tools are called the "managed" and "bare" workflows.
-- With the managed workflow you only write JavaScript / TypeScript and Expo tools and services take care of the rest for you.
-- In the bare workflow you have full control over every aspect of the native project, and Expo tools can't help quite as much.
+- With the _managed workflow_ you only write JavaScript / TypeScript and Expo tools and services take care of everything else for you.
+- In the _bare workflow_ you have full control over every aspect of the native project, and Expo tools and services are a little more limited.
-> 💡 **If you've used React Native without any Expo tools** then you have used the "bare workflow", but the name probably doesn't sound familiar. We call this "bare" somewhat in jest and because of the term "bare metal" which and it's easier to talk about something when it has a name. If you have direct access to the native code, it's a bare project. The ["Already used React Native?"](../../workflow/already-used-react-native/) page might be useful for you to quickly understand where Expo fits in.
+> 💡 **If you've used React Native without any Expo tools** then you have used the "bare workflow", but the name probably doesn't sound familiar. It's easier to talk about something when it has a name, so we call this "bare" – somewhat in jest, and because of the existing term "bare metal". If you have direct access to the native code it's a _bare_ project. The ["Already used React Native?"](../../workflow/already-used-react-native/) page might be useful for you to quickly understand where Expo fits in.
## Managed workflow
-The managed workflow is kind of like "[Rails](https://rubyonrails.org/)" and "[Create React App](https://github.com/facebook/create-react-app)" for React Native.
+The managed workflow is kind of like [Rails](https://rubyonrails.org/) and [Create React App](https://github.com/facebook/create-react-app), but for React Native.
Apps are built with the managed workflow using the [expo-cli](../../workflow/expo-cli/), the Expo client on your mobile device, and our various services: [push notifications](../../guides/push-notifications/), the [build service](../../distribution/building-standalone-apps/), and [over-the-air (OTA) updates](../../guides/configuring-ota-updates/). **Expo tries to manage as much of the complexity of building apps for you as we can, which is why we call it the managed workflow**. A developer using the managed workflow doesn't use Xcode or Android Studio, they just write JavaScript code and manage configuration for things like the app icon and splash screen through [app.json](../../workflow/configuration/). The Expo SDK exposes an increasingly comprehensive set of APIs that give you the power to access device capabilities like the camera, biometric authentication, file system, haptics, and so on.
@@ -32,16 +32,16 @@ In the bare workflow the developer has complete control, along with the complexi
## Workflow comparison
-| Feature | Managed workflow | Bare workflow |
-| ------------------------------------------------------ | ---------------- | ------------------------------------------- |
-| Develop apps with **only** JavaScript/TypeScript | ✅ | |
-| Use Expo build service to create your iOS and Android builds | ✅ | ⏱ (in progress) |
-| Use Expo's push notification service | ✅ | ✅ |
-| Use Expo's over the air updates features | ✅ | ✅ |
-| Develop with the Expo client app | ✅ | ✅ (if you follow [these guidlines](../../bare/using-expo-client/)) |
-| Access to Expo SDK | ✅ | ✅ |
-| Add custom native code and manage native dependencies | | ✅ |
-| Develop in Xcode and Android Studio | | ✅ |
+| Feature | Managed workflow | Bare workflow |
+| ------------------------------------------------------------ | ---------------- | ------------------------------------------------------------------- |
+| Develop apps with **only** JavaScript/TypeScript | ✅ | |
+| Use Expo build service to create your iOS and Android builds | ✅ | ⏱ (in progress) |
+| Use Expo's push notification service | ✅ | ✅ |
+| Use Expo's over the air updates features | ✅ | ✅ |
+| Develop with the Expo client app | ✅ | ✅ (if you follow [these guidlines](../../bare/using-expo-client/)) |
+| Access to Expo SDK | ✅ | ✅ |
+| Add custom native code and manage native dependencies | | ✅ |
+| Develop in Xcode and Android Studio | | ✅ |
## Which workflow is right for me?
diff --git a/docs/pages/tutorial/sharing.md b/docs/pages/tutorial/sharing.md
index 91a7925501422d..a4fa5ab42d0184 100644
--- a/docs/pages/tutorial/sharing.md
+++ b/docs/pages/tutorial/sharing.md
@@ -21,8 +21,7 @@ You can install expo-sharing in the same way as you installed expo-image-picker:
import React from 'react';
import { Image, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
import * as ImagePicker from 'expo-image-picker';
-/* @info As always, we must import it to use it */import * as Sharing from 'expo-sharing';/* @end */
-
+/* @info As always, we must import it to use it */ import * as Sharing from 'expo-sharing'; /* @end */
export default function App() {
const [selectedImage, setSelectedImage] = React.useState(null);
@@ -40,20 +39,18 @@ export default function App() {
return;
}
- Sharing.shareAsync(selectedImage.localUri);
- };/* @end */
-
+ await Sharing.shareAsync(selectedImage.localUri);
+ }; /* @end */
if (selectedImage !== null) {
return (
-Sharing didn't work here because the desktop Chrome browser doesn't yet implement the [Web Share API](https://web.dev/web-share/). *"But wait,"* you say, *"aren't we using expo-sharing, not the Web Share API?"* You can you can think of the Expo SDK libraries as translators for different platforms. They speak the language of Expo and turn it into the language of iOS, Android, and web. It isn't always possible to translate from Expo's language to the platform that you're working with. In other words, if the platform doesn't implement a feature, Expo can't tell it to invoke that feature. In some cases Expo can attempt to [polyfill](https://en.wikipedia.org/wiki/Polyfill_(programming)) the feature for you, but this isn't always possible. Invoking your operating system's built-in share dialog to share content with other applications needs to be implemented by the platform itself — Chrome in this case.
+Sharing didn't work here because the desktop Chrome browser doesn't yet implement the [Web Share API](https://web.dev/web-share/). _"But wait,"_ you say, _"aren't we using expo-sharing, not the Web Share API?"_ You can you can think of the Expo SDK libraries as translators for different platforms. They speak the language of Expo and turn it into the language of iOS, Android, and web. It isn't always possible to translate from Expo's language to the platform that you're working with. In other words, if the platform doesn't implement a feature, Expo can't tell it to invoke that feature. In some cases Expo can attempt to [polyfill](