
Security News
Vite+ Joins the Push to Consolidate JavaScript Tooling
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
@re-frame/preact
Advanced tools
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.
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.import React from "react"
import ReactDOM from "react-dom"
import {createStore} from "@re-frame/standalone"
import {Provider} from "@re-frame/react"
const store = createStore()
const App = () => (
<Provider store={store}>
<YourAppGoesHere />
</Provider>
)
ReactDOM.render(<App />, document.getElementById("root"))
import React from "react"
import {useSubscription} from "@re-frame/react"
const ChatList = () => {
const chats = useSubscription("chats")
return (
<ol>
{chats.map(chat => (
<li key={chat.id}>{chat.title}</li>
)}
</ol>
)
}
import React from "react"
import {useDispatch} from "@re-frame/react"
const MyComponent = () => {
const dispatch = useDispatch()
return (
<button onClick={() => dispatch({id: "my-event"})}>
Click me to trigger "my-event"
</button>
)
}
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.
The npm package @re-frame/preact receives a total of 3 weekly downloads. As such, @re-frame/preact popularity was classified as not popular.
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
Evan You announces Vite+, a commercial, Rust-powered toolchain built on the Vite ecosystem to unify JavaScript development and fund open source.
Security News
Ruby Central’s incident report on the RubyGems.org access dispute sparks backlash from former maintainers and renewed debate over project governance.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.