We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
we can use NativeModules.SettingsManager.settings.RCTDevMenu.isDebuggingRemotely instead of AsyncStorage
NativeModules.SettingsManager.settings.RCTDevMenu.isDebuggingRemotely
AsyncStorage
import { useCallback, useEffect } from 'react'; import { NativeModules, DevSettings } from 'react-native'; export const useRemoteDebugger = () => { const connectToRemoteDebugger = (value: boolean) => () => { NativeModules.DevSettings.setIsDebuggingRemotely(value); }; const handleAddMenuItem = useCallback(() => { // Check if remote debugging is enabled const isDebuggingRemotely = !!NativeModules.SettingsManager.settings.RCTDevMenu.isDebuggingRemotely; setTimeout(() => { DevSettings.addMenuItem( isDebuggingRemotely ? '(*) Stop Debugging' : '(*) Debug JS Remotely', connectToRemoteDebugger(!isDebuggingRemotely) ); }, 100); }, []); useEffect(() => { if (__DEV__) { handleAddMenuItem(); } }, [handleAddMenuItem]); };
The text was updated successfully, but these errors were encountered:
No branches or pull requests
we can use
NativeModules.SettingsManager.settings.RCTDevMenu.isDebuggingRemotely
instead ofAsyncStorage
The text was updated successfully, but these errors were encountered: