
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@rnhooks/dimensions
Advanced tools
React Native hook for Dimensions
$ yarn add @rnhooks/dimensions
import useDimensions from '@rnhooks/dimensions';
function App() {
const { fontScale, width, height, scale } = useDimensions('window');
return (
<View style={styles.container}>
<Text style={styles.type}>{`Width: ${width}`}</Text>
<Text style={styles.type}>{`Height: ${height}`}</Text>
<Text style={styles.type}>{`Font Scale: ${fontScale}, Scale: ${scale}`}</Text>
</View>
);
}
Name | Default | Type | Description |
---|---|---|---|
window / screen | null | string | Type window or screen Dimension |
Name | Type | Default | Description |
---|---|---|---|
width | number | null | Width of the Screen |
height | number | null | Height of the Screen |
fontScale | number | null | Font Scale of the Screen |
scale | number | null | Scale of the Screen |
Feel free to contact me or create an issue
FAQs
React Native hook for Dimensions
We found that @rnhooks/dimensions demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers 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.
Security News
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.