Skip to content

Commit 15b0437

Browse files
authored
Merge pull request #56 from react-native-community/rename-for-rnc
prepare for RNC
2 parents 3d84abf + c9d40ef commit 15b0437

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

README.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,12 @@ React Native APIs turned into React Hooks allowing you to access asynchronous AP
1111
### Installation with npm
1212

1313
```sh
14-
npm install react-native-hooks
14+
npm install @react-native-community/hooks
1515
```
1616

1717
Installation with yarn
1818
```sh
19-
yarn add react-native-hooks
19+
yarn add @react-native-community/hooks
2020
```
2121

2222
## API
@@ -34,7 +34,7 @@ yarn add react-native-hooks
3434
### `useAccessibilityInfo`
3535

3636
```js
37-
import { useAccessibilityInfo } from 'react-native-hooks'
37+
import { useAccessibilityInfo } from '@react-native-community/hooks'
3838

3939
const isScreenReaderEnabled = useAccessibilityInfo()
4040
```
@@ -44,15 +44,15 @@ const isScreenReaderEnabled = useAccessibilityInfo()
4444
AppState will change between one of 'active', 'background', or (iOS) 'inactive' when the app is closed or put into the background.
4545

4646
```js
47-
import { useAppState } from 'react-native-hooks'
47+
import { useAppState } from '@react-native-community/hooks'
4848

4949
const currentAppState = useAppState()
5050
```
5151

5252
### `useBackHandler`
5353

5454
```js
55-
import { useBackHandler } from 'react-native-hooks'
55+
import { useBackHandler } from '@react-native-community/hooks'
5656

5757
useBackHandler(() => {
5858
if (shouldBeHandledHere) {
@@ -67,7 +67,7 @@ useBackHandler(() => {
6767
### `useCameraRoll`
6868

6969
```js
70-
import { useCameraRoll } from 'react-native-hooks'
70+
import { useCameraRoll } from '@react-native-community/hooks'
7171

7272
const [photos, getPhotos, saveToCameraRoll] = useCameraRoll()
7373

@@ -81,7 +81,7 @@ const [photos, getPhotos, saveToCameraRoll] = useCameraRoll()
8181
### `useClipboard`
8282

8383
```js
84-
import { useClipboard } from 'react-native-hooks'
84+
import { useClipboard } from '@react-native-community/hooks'
8585

8686
const [data, setString] = useClipboard()
8787

@@ -95,7 +95,7 @@ const [data, setString] = useClipboard()
9595
Gets dimensions and sets up a listener that will change the dimensions if the user changes device orientation.
9696

9797
```js
98-
import { useDimensions } from 'react-native-hooks'
98+
import { useDimensions } from '@react-native-community/hooks'
9999

100100
const dimensions = useDimensions()
101101
// or
@@ -107,7 +107,7 @@ const screen = useDimensions().screen
107107
### `useKeyboard`
108108

109109
```js
110-
import { useKeyboard } from 'react-native-hooks'
110+
import { useKeyboard } from '@react-native-community/hooks'
111111

112112
const keyboard = useKeyboard()
113113

@@ -118,7 +118,7 @@ console.log('keyboard keyboardHeight: ', keyboard.keyboardHeight)
118118
### `useInteractionManager`
119119

120120
```js
121-
import { useInteractionManager } from 'react-native-hooks'
121+
import { useInteractionManager } from '@react-native-community/hooks'
122122

123123
const interactionReady = useInteractionManager()
124124

@@ -128,7 +128,7 @@ console.log('interaction ready: ', interactionReady)
128128
### `useDeviceOrientation`
129129

130130
```js
131-
import { useDeviceOrientation } from 'react-native-hooks'
131+
import { useDeviceOrientation } from '@react-native-community/hooks'
132132

133133
const orientation = useDeviceOrientation()
134134

@@ -139,7 +139,7 @@ console.log('is orientation landscape: ', orientation.landscape)
139139
### `useLayout`
140140

141141
```js
142-
import { useLayout } from 'react-native-hooks'
142+
import { useLayout } from '@react-native-community/hooks'
143143

144144
const { onLayout, ...layout } = useLayout()
145145

@@ -148,5 +148,5 @@ console.log('layout: ', layout)
148148
<View onLayout={onLayout} style={{width: 200, height: 200, marginTop: 30}} />
149149
```
150150

151-
[version-badge]: https://img.shields.io/npm/v/react-native-hooks.svg?style=flat-square
152-
[package]: https://www.npmjs.com/package/react-native-hooks
151+
[version-badge]: https://img.shields.io/npm/v/@react-native-community/hooks.svg?style=flat-square
152+
[package]: https://www.npmjs.com/package/@react-native-community/hooks

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "react-native-hooks",
2+
"name": "@react-native-community/hooks",
33
"version": "1.1.0",
44
"description": "",
55
"main": "lib/index.js",

0 commit comments

Comments
 (0)