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.
sonner-native
Advanced tools
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
success
, error
, warning
, custom
, promise
https://snack.expo.dev/@gunnartorfis/sonner-native
npx expo install sonner-native
To use this package, you also need to install its peer dependencies. Check out their documentation for more information:
import { Toaster } from 'sonner-native';
function App() {
return (
<View>
<NavigationContainer>...</NavigationContainer>
<Toaster />
</View>
);
}
import { toast } from 'sonner-native';
function SomeComponent() {
return (
<Button
title="Show Toast"
onPress={() => toast('Hello, World!')}
/>
);
}
Even though Sonner Native works on the web, it is not recommended to use it there. Instead, use the original Sonner.
The following setup is recommended. Add a sonner.ts
and sonner.web.ts
file to your project and import from there instead of from this library directly. That way, sonner will be used on the web and sonner-native on native.
// sonner.ts
export * from 'sonner-native';
// sonner.web.ts
export * from 'sonner';
For more advanced usage, check out the documentation
https://github.com/user-attachments/assets/ccc428ca-37c3-4589-9e8c-f414c40d764c
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
Made with create-react-native-library
FAQs
An opinionated toast component for React Native. A port of @emilkowalski's sonner.
The npm package sonner-native receives a total of 4,524 weekly downloads. As such, sonner-native popularity was classified as popular.
We found that sonner-native demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.