
Security News
Another Round of TEA Protocol Spam Floods npm, But It’s Not a Worm
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.
@re-frame/preact
Advanced tools
1. Make your store available via React context by using `Provider` from `@re-frame/react` at the top of your application. This will allow you to access subscriptions and dispatch events within the React tree.
Provider from @re-frame/react at the top of your application. This will allow you to access subscriptions and dispatch events within the React tree.import {h, render} from "preact"
import {createStore} from "@re-frame/standalone"
import {Provider} from "@re-frame/preact"
const store = createStore()
const App = () => (
<Provider store={store}>
<YourAppGoesHere />
</Provider>
)
render(<App />, document.getElementById("root"))
import {h} from "preact"
import {useSubscription} from "@re-frame/preact"
const ChatList = () => {
const chats = useSubscription(["chats"])
return (
<ol>
{chats.map(chat => (
<li key={chat.id}>{chat.title}</li>
)}
</ol>
)
}
import {h} from "preact"
import {useDispatch} from "@re-frame/preact"
// Dispatch will only fire once in this example
const ChatList = () => {
useDispatch(["load-chats"])
// ... more logic here
}
// Dispatch will fire every time `filter` changes
const ChatList = ({filter}) => {
useDispatch(["load-chats", filter])
// ... more logic here
}
// useDispatch also returns a "dispatch" function
const ChatList = () => {
const dispatch = useDispatch() // does not dispatch anything
const onClick = () => {
dispatch(["some-click-event"])
}
// ... more logic here
}
FAQs
1. Make your store available via React context by using `Provider` from `@re-frame/preact` at the top of your application. This will allow you to access subscriptions and dispatch events within the React tree.
We found that @re-frame/preact 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
Recent coverage mislabels the latest TEA protocol spam as a worm. Here’s what’s actually happening.

Security News
PyPI adds Trusted Publishing support for GitLab Self-Managed as adoption reaches 25% of uploads

Research
/Security News
A malicious Chrome extension posing as an Ethereum wallet steals seed phrases by encoding them into Sui transactions, enabling full wallet takeover.