
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
storeon-solidjs
Advanced tools
Solid.js a declarative, efficient, and flexible JavaScript library for building user interfaces. storeon-solidjs
package helps to connect store with Solid.js to provide a better performance and developer experience while remaining so tiny.
npm install -S storeon-solidjs
or
yarn add storeon-solidjs
Create store using storeon
module:
store.js
import { createStoreon } from 'storeon'
let counter = store => {
store.on('@init', () => ({ count: 0 }))
store.on('inc', ({ count }) => ({ count: count + 1 }))
}
export const store = createStoreon([counter])
main.js
Provide store using StoreonProvider
from storeon-solidjs
:
import { render } from 'solid-js/dom'
import { StoreonProvider } from 'storeon-solidjs'
import { store } from './store'
render(
<StoreonProvider store={store}>
<App />
</StoreonProvider>,
document.body
)
Import useStoreon
decorator from storeon-solidjs
:
Counter.jsx
import { useStoreon } from 'storeon-solidjs'
export default function Counter() {
const [state, dispatch] = useStoreon()
return (
<div>
{state.count}
<button onClick={() => dispatch('inc')}>inc</button>
</div>
)
}
Counter.tsx
import { useStoreon } from 'storeon-solidjs'
import { State, Events } from './store'
export default function Counter() {
const [state, dispatch] = useStoreon<State, Events>()
return (
<div>
{state.count}
<button onClick={() => dispatch('inc')}>inc</button>
</div>
)
}
0.1.0
FAQs
A tiny connector for Storeon and Solid.js
We found that storeon-solidjs 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.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.