Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@exponent/react-native-action-sheet
Advanced tools
ActionSheet is a cross-platform React Native component that uses the native UIActionSheet on iOS and a JS implementation on Android. Almost a drop in replacement for ActionSheetIOS except it cannot be called statically.
npm install @exponent/react-native-action-sheet
Wrap your entire app in ActionSheet
. We recommend using context to pass ActionSheet
to the rest of your app.
class MainApp extends React.Component {
static childContextTypes = {
actionSheet: PropTypes.func,
};
getChildContext() {
return {
actionSheet: () => this._actionSheetRef,
};
}
render() {
return (
<ActionSheet ref={component => this._actionSheetRef = component}>
// Render the rest of your app here.
</ActionSheet>
);
}
}
To open the action sheet:
class OtherComponent extends React.Component {
static contextTypes = {
actionSheet: PropTypes.func,
};
getChildContext() {
return {
actionSheet: () => this._actionSheetRef,
};
}
_onOpenActionSheet() {
// Same interface as https://facebook.github.io/react-native/docs/actionsheetios.html
let options = ['Delete', 'Save', 'Cancel'];
let destructiveButtonIndex = 0;
let cancelButtonIndex = 2;
this.context.actionSheet().showActionSheetWithOptions({
options,
cancelButtonIndex,
destructiveButtonIndex,
},
(buttonIndex) => {
// Do something here
});
}
}
FAQs
A cross-platform ActionSheet for React Native
The npm package @exponent/react-native-action-sheet receives a total of 9 weekly downloads. As such, @exponent/react-native-action-sheet popularity was classified as not popular.
We found that @exponent/react-native-action-sheet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.