Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@nanostores/solid
Advanced tools
Solid integration for [Nano Stores], a tiny state manager with many atomic tree-shakable stores.
Install it:
pnpm add nanostores @nanostores/solid # or npm or yarn
Use it:
// store.ts
import { action, atom, computed } from 'nanostores';
export const bearStore = atom({ value: 0 });
export const increase = action(bearStore, 'increase', (store) => {
store.set({ value: store.get().value + 1 });
});
// Use computed stores to create chains of reactive computations.
export const doubled = computed(bearStore, current =>
current.count * 2,
);
import { createStore } from '@nanostores/solid';
import { bearStore, increase } from './store';
function BearCounter() {
const count = createStore(bearStore);
return <h1>{count().value} around here ...</h1>;
}
function Controls() {
return <button onClick={increase}>one up</button>;
}
Nano Stores support SSR. Use standard strategies.
import { isServer } from 'solid-js/web';
if (isServer) {
settings.set(initialSettings);
router.open(renderingPageURL);
}
You can wait for async operations (for instance, data loading via isomorphic fetch()
) before rendering the page:
import { renderToString } from 'solid-js/web';
import { allTasks } from 'nanostores';
post.listen(() => {}); // Move store to active mode to start data loading
await allTasks();
const html = renderToString(<App />);
MIT
FAQs
Solid integration for Nano Stores, a tiny state manager with many atomic tree-shakable stores.
We found that @nanostores/solid demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Security News
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.