Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@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>
)
}
FAQs
A tiny connector for Storeon and Solid.js
The npm package @storeon/solidjs receives a total of 1 weekly downloads. As such, @storeon/solidjs popularity was classified as not popular.
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 2 open source maintainers 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.