Skip to content

Commit b2da8a5

Browse files
authored
Merge branch 'master' into fix-keyboard-android-2
2 parents cbc7425 + 32aad1d commit b2da8a5

17 files changed

+1137
-990
lines changed

.all-contributorsrc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@
187187
"contributions": [
188188
"code"
189189
]
190+
},
191+
{
192+
"login": "Gamal-Shaban",
193+
"name": "Gamal Shaban",
194+
"avatar_url": "https://avatars1.githubusercontent.com/u/17288652?v=4",
195+
"profile": "https://github.com/Gamal-Shaban",
196+
"contributions": [
197+
"code"
198+
]
190199
}
191200
],
192201
"contributorsPerLine": 7

CHANGELOG.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
1+
# v2.4.8 (Mon Mar 30 2020)
2+
3+
:tada: This release contains work from new contributors! :tada:
4+
5+
Thanks for all your work!
6+
7+
:heart: Gamal Shaban ([@Gamal-Shaban](https://github.com/Gamal-Shaban))
8+
9+
:heart: WhiteSource Renovate ([@renovate-bot](https://github.com/renovate-bot))
10+
11+
#### 🐛 Bug Fix
12+
13+
- Update dependency react-native to v0.62.0 [#105](https://github.com/react-native-community/hooks/pull/105) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
14+
- fix crash in android when hide keyboard [#117](https://github.com/react-native-community/hooks/pull/117) ([@Gamal-Shaban](https://github.com/Gamal-Shaban))
15+
- Update dependency auto to v9.22.1 [#116](https://github.com/react-native-community/hooks/pull/116) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
16+
- Update dependency @auto-it/first-time-contributor to v9.21.2 [#112](https://github.com/react-native-community/hooks/pull/112) ([@renovate-bot](https://github.com/renovate-bot))
17+
- Update dependency auto to v9.21.2 [#113](https://github.com/react-native-community/hooks/pull/113) ([@renovate-bot](https://github.com/renovate-bot))
18+
- Update dependency @auto-it/all-contributors to v9.21.2 [#111](https://github.com/react-native-community/hooks/pull/111) ([@renovate-bot](https://github.com/renovate-bot))
19+
- Update dependency @react-native-community/eslint-config to v1 [#109](https://github.com/react-native-community/hooks/pull/109) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
20+
- Update dependency jest to v25.2.3 [#108](https://github.com/react-native-community/hooks/pull/108) ([@renovate-bot](https://github.com/renovate-bot))
21+
- [META] Stop using default export internally [#106](https://github.com/react-native-community/hooks/pull/106) ([@pvinis](https://github.com/pvinis))
22+
- Update dependency jest to v25.2.4 [#118](https://github.com/react-native-community/hooks/pull/118) ([@renovate-bot](https://github.com/renovate-bot))
23+
- Update dependency jest to v25.2.2 [#104](https://github.com/react-native-community/hooks/pull/104) ([@renovate-bot](https://github.com/renovate-bot))
24+
- Update dependency jest to v25.2.1 [#103](https://github.com/react-native-community/hooks/pull/103) ([@renovate-bot](https://github.com/renovate-bot))
25+
- Update dependency jest to v25.2.0 [#102](https://github.com/react-native-community/hooks/pull/102) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
26+
- Update dependency @types/react to v16.9.25 [#98](https://github.com/react-native-community/hooks/pull/98) ([@renovate-bot](https://github.com/renovate-bot) [@renovate[bot]](https://github.com/renovate[bot]))
27+
- Update dependency @auto-it/first-time-contributor to v9.20.1 [#93](https://github.com/react-native-community/hooks/pull/93) ([@renovate-bot](https://github.com/renovate-bot))
28+
- Update dependency auto to v9.20.1 [#94](https://github.com/react-native-community/hooks/pull/94) ([@renovate-bot](https://github.com/renovate-bot))
29+
- Update dependency @auto-it/all-contributors to v9.20.1 [#92](https://github.com/react-native-community/hooks/pull/92) ([@renovate-bot](https://github.com/renovate-bot))
30+
- Update react monorepo to v16.13.1 [#91](https://github.com/react-native-community/hooks/pull/91) ([@renovate-bot](https://github.com/renovate-bot))
31+
32+
#### ⚠️ Pushed to `master`
33+
34+
- get rid of some shadowing ([@pvinis](https://github.com/pvinis))
35+
- bump pretteir ([@pvinis](https://github.com/pvinis))
36+
- upg ([@pvinis](https://github.com/pvinis))
37+
38+
#### Authors: 4
39+
40+
- [@renovate[bot]](https://github.com/renovate[bot])
41+
- Gamal Shaban ([@Gamal-Shaban](https://github.com/Gamal-Shaban))
42+
- Pavlos Vinieratos ([@pvinis](https://github.com/pvinis))
43+
- WhiteSource Renovate ([@renovate-bot](https://github.com/renovate-bot))
44+
45+
---
46+
147
# v2.4.7 (Thu Mar 19 2020)
248

349
:tada: This release contains work from new contributors! :tada:

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
186186
<td align="center"><a href="https://dylanvann.com/"><img src="https://avatars0.githubusercontent.com/u/1537615?v=4" width="100px;" alt=""/><br /><sub><b>Dylan Vann</b></sub></a><br /><a href="https://github.com/react-native-community/hooks/commits?author=DylanVann" title="Code">💻</a></td>
187187
<td align="center"><a href="https://github.com/thinklinux"><img src="https://avatars1.githubusercontent.com/u/326949?v=4" width="100px;" alt=""/><br /><sub><b>Tihomir Valkanov</b></sub></a><br /><a href="https://github.com/react-native-community/hooks/commits?author=thinklinux" title="Documentation">📖</a></td>
188188
<td align="center"><a href="http://twitter.com/pistoudev"><img src="https://avatars1.githubusercontent.com/u/6703711?v=4" width="100px;" alt=""/><br /><sub><b>Pierre Skowron</b></sub></a><br /><a href="https://github.com/react-native-community/hooks/commits?author=pistou" title="Code">💻</a></td>
189+
<td align="center"><a href="https://github.com/Gamal-Shaban"><img src="https://avatars1.githubusercontent.com/u/17288652?v=4" width="100px;" alt=""/><br /><sub><b>Gamal Shaban</b></sub></a><br /><a href="https://github.com/react-native-community/hooks/commits?author=Gamal-Shaban" title="Code">💻</a></td>
189190
</tr>
190191
</table>
191192

package.json

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@react-native-community/hooks",
3-
"version": "2.4.7",
3+
"version": "2.4.8",
44
"description": "",
55
"main": "lib/index.js",
66
"types": "lib/index.d.ts",
@@ -9,6 +9,8 @@
99
"build": "tsc",
1010
"test": "jest",
1111
"lint": "eslint src/**/*.ts",
12+
"eslint-fix": "eslint src/**/*.ts --fix",
13+
"prettier-fix": "prettier --write \"**/*.{ts,tsx}\"",
1214
"release": "auto shipit",
1315
"release-canary": "auto canary"
1416
},
@@ -17,22 +19,22 @@
1719
"react-native": ">=0.59"
1820
},
1921
"devDependencies": {
20-
"@auto-it/all-contributors": "9.21.0",
21-
"@auto-it/first-time-contributor": "9.21.0",
22-
"@react-native-community/eslint-config": "0.0.7",
22+
"@auto-it/all-contributors": "9.21.2",
23+
"@auto-it/first-time-contributor": "9.26.6",
24+
"@react-native-community/eslint-config": "1.0.0",
2325
"@testing-library/react-hooks": "3.2.1",
2426
"@testing-library/react-native": "5.0.3",
25-
"@types/jest": "25.1.4",
27+
"@types/jest": "25.1.5",
2628
"@types/react": "16.9.25",
2729
"@types/react-native": "0.61.23",
28-
"all-contributors-cli": "6.14.0",
29-
"auto": "9.21.0",
30+
"all-contributors-cli": "6.14.1",
31+
"auto": "9.22.4",
3032
"eslint": "6.8.0",
3133
"eslint-plugin-prettier": "3.1.2",
32-
"jest": "25.2.0",
33-
"prettier": "1.19.1",
34+
"jest": "25.2.7",
35+
"prettier": "2.0.4",
3436
"react": "16.13.1",
35-
"react-native": "0.61.5",
37+
"react-native": "0.62.1",
3638
"react-test-renderer": "16.13.1",
3739
"ts-jest": "25.2.1",
3840
"typescript": "3.8.3"

src/index.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
import useDimensions from './useDimensions'
2-
import useAppState from './useAppState'
3-
import useBackHandler from './useBackHandler'
4-
import useCameraRoll from './useCameraRoll'
5-
import useClipboard from './useClipboard'
6-
import useAccessibilityInfo from './useAccessibilityInfo'
7-
import useKeyboard from './useKeyboard'
8-
import useInteractionManager from './useInteractionManager'
9-
import useDeviceOrientation from './useDeviceOrientation'
10-
import useLayout from './useLayout'
1+
import {useDimensions} from './useDimensions'
2+
import {useAppState} from './useAppState'
3+
import {useBackHandler} from './useBackHandler'
4+
import {useCameraRoll} from './useCameraRoll'
5+
import {useClipboard} from './useClipboard'
6+
import {useAccessibilityInfo} from './useAccessibilityInfo'
7+
import {useKeyboard} from './useKeyboard'
8+
import {useInteractionManager} from './useInteractionManager'
9+
import {useDeviceOrientation} from './useDeviceOrientation'
10+
import {useLayout} from './useLayout'
1111

1212
export {
1313
useDimensions,

src/useAccessibilityInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import {
55
AccessibilityEvent,
66
} from 'react-native'
77

8-
export default function useAccessibilityInfo() {
8+
export function useAccessibilityInfo() {
99
const [reduceMotionEnabled, setReduceMotionEnabled] = useState(false)
1010
const [screenReaderEnabled, setScreenReaderEnabled] = useState(false)
1111

src/useAppState.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {useEffect, useState} from 'react'
22
import {AppState, AppStateStatus} from 'react-native'
33

4-
export default function useAppState() {
4+
export function useAppState() {
55
const currentState = AppState.currentState
66
const [appState, setAppState] = useState(currentState)
77

src/useBackHandler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import {useEffect} from 'react'
22
import {BackHandler} from 'react-native'
33

4-
export default function useBackHandler(handler: () => boolean) {
4+
export function useBackHandler(handler: () => boolean) {
55
useEffect(() => {
66
BackHandler.addEventListener('hardwareBackPress', handler)
77

src/useCameraRoll.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,13 @@ const defaultConfig: GetPhotosParamType = {
1515
groupTypes: 'All',
1616
}
1717

18-
export default function useCameraRoll() {
18+
export function useCameraRoll() {
1919
const [photos, setPhotos] = useState(initialState)
2020

2121
async function getPhotos(config = defaultConfig) {
2222
try {
23-
const photos = await CameraRoll.getPhotos(config)
24-
setPhotos(photos)
23+
const result = await CameraRoll.getPhotos(config)
24+
setPhotos(result)
2525
} catch (err) {
2626
console.log('error: ', err)
2727
}

src/useClipboard.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ const listeners = new Set<Listener>()
66

77
function setString(content: string) {
88
Clipboard.setString(content)
9-
listeners.forEach(listener => listener(content))
9+
listeners.forEach((listener) => listener(content))
1010
}
1111

12-
export default function useClipBoard(): [string, (content: string) => void] {
12+
export function useClipboard(): [string, (content: string) => void] {
1313
const [data, updateClipboardData] = useState('')
1414

1515
// Get initial data

0 commit comments

Comments
 (0)