@kobe-brants/react-native-keep-awake 1.0.16 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +8 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -5,18 +5,22 @@ Keep device screen awake for React Native
5
5
  ## Installation
6
6
 
7
7
  ```sh
8
- npm install react-native-keep-awake
8
+ npm install @kobe-brants/react-native-keep-awake
9
9
  ```
10
10
 
11
11
  ## Usage
12
12
 
13
13
 
14
14
  ```js
15
- import { multiply } from 'react-native-keep-awake';
15
+ import KeepAwake from '@kobe-brants/react-native-keep-awake';
16
16
 
17
- // ...
17
+ useEffect(() => {
18
+ KeepAwake.activate();
18
19
 
19
- const result = multiply(3, 7);
20
+ return () => {
21
+ KeepAwake.deactivate();
22
+ };
23
+ }, []);
20
24
  ```
21
25
 
22
26
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kobe-brants/react-native-keep-awake",
3
- "version": "1.0.16",
3
+ "version": "1.1.0",
4
4
  "description": "Keep device screen awake for React Native",
5
5
  "source": "./src/index.tsx",
6
6
  "main": "./lib/commonjs/index.js",