Skip to content

Commit 29db8c3

Browse files
pweisenseepatlux
authored andcommitted
fix typos in example code and doc
1 parent ef6aff0 commit 29db8c3

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
The only purpose of this library is to manage the Bluetooth state. Not more, not less.
66

7-
If you need further functionality like connecting and communicating to a device, please look at [react-native-ble-plx](https://github.com/Polidea/react-native-ble-plx).
7+
If you need further functionality like connecting and communicating with a device, please look at [react-native-ble-plx](https://github.com/Polidea/react-native-ble-plx).
88

9-
## Table Of Content
9+
## Table Of Contents
1010

1111
- [Installation](#installation)
1212
- [Setup](#setup)
@@ -32,7 +32,7 @@ import { BluetoothStateManager } from "react-native-bluetooth-state-manager";
3232

3333
**iOS**
3434

35-
You must provide a short description why you need access to bluetooth in your app. Otherwise your app will crash when requesting for bluetooth:
35+
You must provide a short description of why you need access to Bluetooth in your app. Otherwise, your app will crash when requesting Bluetooth access:
3636

3737
```
3838
This app has crashed because it attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain an NSBluetoothAlwaysUsageDescription key with a string value explaining to the user how the app uses this data.
@@ -42,15 +42,15 @@ See: https://developer.apple.com/documentation/bundleresources/information_prope
4242

4343
**Android**
4444

45-
To use `requestToEnable()` and `requestToDisable()` on android, you have to add `BLUETOOTH_CONNECT` permission to your `AndroidManifest.xml`:
45+
To use `requestToEnable()` and `requestToDisable()` on Android, you have to add the `BLUETOOTH_CONNECT` permission to your `AndroidManifest.xml`:
4646

4747
```diff
4848
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
4949
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT"/>
5050
</manifest>
5151
```
5252

53-
`BLUETOOTH_CONNECT` is a runtime permission, that means you must ask the user at runtime for permission. For that, we recommend [react-native-permissions](https://github.com/zoontek/react-native-permissions/tree/master).
53+
`BLUETOOTH_CONNECT` is a runtime permission, which means you must ask the user at runtime for permission. For that, we recommend [react-native-permissions](https://github.com/zoontek/react-native-permissions/tree/master).
5454

5555
## Usage
5656

@@ -64,13 +64,13 @@ import {
6464
// Get bluetooth state
6565

6666
// hook
67-
const bluetootState = useBluetoothState();
67+
const bluetoothState = useBluetoothState();
6868
// synchronous
69-
const bluetootState = BluetoothStateManager.getStateSync();
69+
const bluetoothState = BluetoothStateManager.getStateSync();
7070
// asynchronous
71-
const bluetootState = await BluetoothStateManager.getState();
71+
const bluetoothState = await BluetoothStateManager.getState();
7272
// Event listener
73-
const [bluetootState, setBluetoothState] = useState<BluetoothState>();
73+
const [bluetoothState, setBluetoothState] = useState<BluetoothState>();
7474
useEffect(() => {
7575
const remove = BluetoothStateManager.addListener((state) => {
7676
setBluetoothState(state);
@@ -199,7 +199,7 @@ BluetoothStateManager.openSettings();
199199

200200
Show a dialog that allows the user to turn on Bluetooth. More here: [Android documentation](https://developer.android.com/reference/android/bluetooth/BluetoothAdapter.html#ACTION_REQUEST_ENABLE).
201201

202-
- This function is **only** on **android** available.
202+
- This function is **only** available on **Android**.
203203

204204
```tsx
205205
try {
@@ -213,7 +213,7 @@ try {
213213

214214
Show a dialog that allows the user to turn off Bluetooth.
215215

216-
- This function is **only** on **android** available.
216+
- This function is **only** available on **Android**.
217217

218218
```tsx
219219
try {
@@ -225,7 +225,7 @@ try {
225225

226226
## Why?
227227

228-
##### Why not just using [react-native-ble-plx](https://github.com/Polidea/react-native-ble-plx)?
228+
##### Why not just use [react-native-ble-plx](https://github.com/Polidea/react-native-ble-plx)?
229229

230230
Because it's too bloated for my needs.
231231

0 commit comments

Comments
 (0)