diff --git a/docs/appstate.md b/docs/appstate.md index 740a7ba0a84..c22729798d8 100644 --- a/docs/appstate.md +++ b/docs/appstate.md @@ -48,7 +48,7 @@ const AppStateExample = () => { return () => { AppState.removeEventListener("change", _handleAppStateChange); }; - }, []); + }, [_handleAppStateChange]); const _handleAppStateChange = (nextAppState) => { if (appState.current.match(/inactive|background/) && nextAppState === "active") {