
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
@eps1lon/notistack
Advanced tools
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
Notistack is a Snackbar library which makes it extremely easy to display notifications on your web apps. It is highly customizable and enables you to stack snackbars/toasts on top of one another. See demos for more info.
Play with online demo here
Stacking behaviour | Dismiss oldest when reached maxSnack (3 here) |
---|---|
![]() | ![]() |
Use your preferred package manager:
npm install notistack
yarn add notistack
1: Wrap your app inside a SnackbarProvider
component: (see docs for a full list of available props)
import { SnackbarProvider } from 'notistack';
<SnackbarProvider maxSnack={3}>
<App />
</SnackbarProvider>
2: Export any component that needs to send notification using withSnackbar
. By doing this, you'll have access to methods enqueueSnackbar
and closeSnackbar
, where the former can be used to send snackbars.
import { withSnackbar } from 'notistack';
class MyComponent extends Component {
handleNetworkRequest = () => {
fetchSomeData()
.then(() => this.props.enqueueSnackbar('Successfully fetched the data.'))
.catch(() => this.props.enqueueSnackbar('Failed fetching data.'));
};
render(){
//...
};
};
export default withSnackbar(MyComponent);
You can see the online demo and experiment all the possible configurations here
.
Or see the code for a minimal working example: codesandbox
Visit the documentation website
notistack is compatible with state management libraries such as Redux and Mobx. See notistack documentation for more info.
Open an issue and your problem will be solved.
Material Design guidelines suggests that only one snackbar should be displayed at a time. But I liked to stack them. 😁 So I made notistack. But if you'd like to stick to the guidelines, you can set maxSnack
to 1
and just take advantage of enqueueSnackbar
function.
Hossein Dehnokhalaji
FAQs
Highly customizable notification snackbars (toasts) that can be stacked on top of each other
We found that @eps1lon/notistack 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.
Research
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.