
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.
@oyvindher/react-reportr
Advanced tools
Easiest notification spawner of all time, highly customizable!
With NPM:
npm install @oyvindher/react-reportr
or with Yarn:
yarn add @oyvindher/react-reportr
import {
NotificationProvider,
useNotification,
} from "@oyvindher/react-reportr";
const App: React.FC = () => {
return (
<NotificationProvider>
<Example />
</NotificationProvider>
);
};
const Example: React.FC = () => {
const { spawn } = useNotification();
return (
<div>
<button
onClick={() =>
spawn({
title: "Hey, I am a notification",
})
}
>
Spawn notification!
</button>
</div>
);
};
Tip: If your app doesn't support hooks yet, you can always use regular Context from the exported NotificationContext
in React Reportr
.
On the provider, you can specify a settings props to customize even more to your own needs.
<NotificationProvider settings={mysettings}></NotificationProvider>
Settings options
Option | Type | Default | Required |
---|---|---|---|
despawnTime | number | 2400 | false |
verticalDirection | top , bottom | top | false |
horizontalDirection | left , right | right | false |
customNotification | React.FC<NotificationStackInterface> | null | false |
The default design of the notifications might not suit your app. Here's an example of making a custom one!
const MyCustomNotifcation: React.FC<NotificationStackInterface> = ({
id,
title,
subtitle,
variant,
despawning, // used for animations on unmounting
}) => {
return (
<div>
<h2>{title} 👋</h2>
<small>{subtitle}</small>
</div>
);
};
const App: React.FC = () => {
return (
<NotificationProvider
settings={{
customNotification: MyCustomNotifcation,
}}
>
{/*....app code*/}
</NotificationProvider>
);
};
useNotification is a helpful React hook to easily make notifications across your code base. It gives you a way of spawning and despawning notifications. It also gives you the list of spawned notifications, mostly for reference.
const { spawn, despawn, notifications } = useNotification();
Option | Type | Default | Required |
---|---|---|---|
id | string | 2400 | false |
title | string | true | |
subtitle | string | undefined | false |
variant | info , success , warning , danger , info | info | false |
Option | Type | Default | Required |
---|---|---|---|
id | string | undefined | true |
FAQs
Easiest notification spawner of all time, highly customizable!
We found that @oyvindher/react-reportr 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.