We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
unknown
1 parent cd2e45b commit 9161219Copy full SHA for 9161219
lib/useAppState.js
@@ -1,9 +1,9 @@
1
import React, { useEffect, useState } from 'react'
2
import { AppState } from 'react-native'
3
4
-const currentState = AppState.currentState
5
-
+// https://github.com/facebook/react-native/issues/18836
6
export default () => {
+ const currentState = AppState.currentState
7
const [appState, setAppState] = useState(currentState)
8
9
function onChange (newState) {
@@ -19,4 +19,4 @@ export default () => {
19
})
20
21
return appState
22
-}
+}
0 commit comments