
Security News
Risky Biz Podcast: Making Reachability Analysis Work in Real-World Codebases
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
dojo2-stateful
Advanced tools
A simple state lib for Dojo 2 inspired by Unstated.
npm install dojo2-stateful
Simple state mechanism that enables sharing state across your application widget tree without needing to introduce complex state management.
Simple Counter Example:
import { ProjectorMixin } from '@dojo/widget-core/mixins/Projector';
import Registry from '@dojo/widget-core/Registry';
import { WidgetBase } from '@dojo/widget-core/WidgetBase';
import { w, v } from '@dojo/widget-core/d';
import { createStatefulProvider, Container, Subscribe } from 'dojo2-stateful';
interface CounterState {
count: number
};
class CounterContainer extends Container<CounterState> {
state = {
count: 0
};
increment = () => {
this.setState({ count: this.state.count + 1 });
}
decrement = () => {
this.setState({ count: this.state.count - 1 });
}
}
class Counter extends ProjectorMixin(WidgetBase) {
protected render() {
return w(Subscribe, { to: [CounterContainer], render: (counter: CounterContainer) => {
return v('div', [
v('button', { onclick: counter.decrement }, [ 'Decrement' ]),
v('span', [ `${counter.state.count}` ]),
v('button', { onclick: counter.increment }, [ 'Increment' ])
])
}})
}
}
const registry = new Registry();
// create state provider for the registry
createStatedProvider(registry);
const counter = new Counter();
counter.setProperties({ registry });
counter.append();
FAQs
Small stateful lib for working with Dojo 2 widgets
The npm package dojo2-stateful receives a total of 0 weekly downloads. As such, dojo2-stateful popularity was classified as not popular.
We found that dojo2-stateful 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
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.
Security News
CISA’s 2025 draft SBOM guidance adds new fields like hashes, licenses, and tool metadata to make software inventories more actionable.