
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
react-native-safe-area-view-with-get-inset
Advanced tools
JS only version of SafeAreaView for supporting iPhone X safe area insets, with getInset.
This is a JS-only version of SafeAreaView that will be available in React Native v0.50.0, to be released at the beginning of November. This version also adds a small api that makes SafeAreaView more flexible for complex UIs. React Navigation already includes and uses this view starting in v1.0.0-beta.16.
Wrap components that touch any edge of the screen with SafeAreaView.
<SafeAreaView>
<View>
<Text>Look, I'm safe!</Text>
</View>
</SafeAreaView>
Sometimes you will observe unexpected behavior and jank because SafeAreaView uses onLayout
then calls measureInWindow
on the view. If you know your view will touch certain edges, use forceInset
to force it to apply the inset padding on the view.
<SafeAreaView forceInset={{ top: 'always' }}>
<View>
<Text>Yeah, I'm safe too!</Text>
</View>
</SafeAreaView>
forceInset
takes an object with the keys top | bottom | left | right | vertical | horizontal
and the values 'always' | 'never'
. Or you can override the padding altogether by passing an integer.
If you need to access inset information, use the SafeAreaView's static getInset
method.
Accepts 2 parameters:
top | right | bottom | left
The inset direction to get
true | false
Whether the app is currently in landscape position. Default = false Example:
<NavigationHeader style={{paddingTop: SafeAreaView.getInset('top')}} />
Sometimes you would prefer to use a higher-order component to wrap components.
withSafeArea()(Component);
// Or with forceInset props
withSafeArea({ top: 'always' })(Component);
FAQs
JS only version of SafeAreaView for supporting iPhone X safe area insets, with getInset.
The npm package react-native-safe-area-view-with-get-inset receives a total of 0 weekly downloads. As such, react-native-safe-area-view-with-get-inset popularity was classified as not popular.
We found that react-native-safe-area-view-with-get-inset 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.