
Product
Introducing Tier 1 Reachability: Precision CVE Triage for Enterprise Teams
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
react-native-direction-control
Advanced tools
A React Native component for handling directional inputs, perfect for interactive applications requiring gesture and directional control.
A flexible and feature-rich button component for React Native applications, offering a variety of customization options including icons, subtitles, loading state, and more.
react-native-direction-control
is a React Native module for managing and controlling the device's screen direction. This module allows you to programmatically lock the device's screen to a specific direction and detect orientation changes.
npm install react-native-direction-control
# or
yarn add react-native-direction-control
import { DirectionControl } from 'react-native-direction-control';
// Get current screen direction
DirectionControl.getOrientation().then(direction => {
console.log(direction);
});
// Lock to landscape direction
DirectionControl.lockToLandscape();
// Lock to portrait direction
DirectionControl.lockToPortrait();
// Unlock all orientations
DirectionControl.unlockAllDirections();
// Add a listener for direction changes
const onDirectionChange = direction => {
console.log('Screen direction changed to:', direction);
};
DirectionControl.addDirectionChangeListener(onDirectionChange);
// Remove the listener
DirectionControl.removeDirectionChangeListener(onDirectionChange);
getOrientation()
: PromiselockToPortrait()
: voidlockToLandscape()
: voidunlockAllDirections()
: voidaddDirectionChangeListener(callback: Function)
: voidremoveDirectionChangeListener(callback: Function)
: voidThis project is licensed under the MIT License.
FAQs
A React Native component for handling directional inputs, perfect for interactive applications requiring gesture and directional control.
We found that react-native-direction-control demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.
Research
/Security News
Ongoing npm supply chain attack spreads to DuckDB: multiple packages compromised with the same wallet-drainer malware.
Security News
The MCP Steering Committee has launched the official MCP Registry in preview, a central hub for discovering and publishing MCP servers.