Skip to content

Commit 9c229ff

Browse files
authored
Merge pull request #14 from nihaux/fix-use-appstate
useAppState: useEffect should declare none deps to avoid trigger each render
2 parents ab18bb8 + 6fdc506 commit 9c229ff

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/useAppState.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default () => {
1616
return () => {
1717
AppState.removeEventListener('change', onChange)
1818
}
19-
})
19+
},[])
2020

2121
return appState
2222
}

0 commit comments

Comments
 (0)