
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@mvc-react/stateful
Advanced tools
Lean toolkit for 'stateful' MVC use cases in React. It is based on @mvc-react/mvc (see more here).
npm install --save @mvc-react/stateful
This package allows you to utilize stateful InteractiveModels in your React application. Statefulness, in this context, simply means that the model properties/functions persist between component renders.
The model's modelView is observable and only changes when altered by the model's interact method. This drastically simplifies state logic and management for React components and hooks which are based on this framework.
InteractiveModel state logic@mvc-react ecosystem when integrated with them.StatifiableModelRepresents a Model that can be transformed into a stateful InteractiveModel. It consists of an additional ViewInteractionInterface object whose function is similar to that of a Redux reducer.
ViewInteractionInterfaceThe interface contains a single function, produceModelView, which accepts a ModelInteraction and returns a Promise for the new corresponding ModelView.
import { ViewInteractionInterface } from @mvc-react/stateful;
const interface: ViewInteractionInterface<
CalculatorModelView,
CalculatorInteraction
> = {
produceModelView(interaction: CalculatorInteraction) {
switch (interaction.type) {
case "add": {
const { x, y } = interaction.input!;
return Promise.resolve({ display: x + y });
}
case "subtract": {
const { x, y } = interaction.input!;
return Promise.resolve({ display: x - y });
}
default:
return Promise.reject("Unhandled interaction");
}
}
}
useInitializedStatefulInteractiveModelConstructs stateful InteractiveModel with observable modelView, which is based on the provided viewInteractionInterface and is initialized with provided initialModelView.
useNewStatefulInteractiveModelConstructs stateful InteractiveModel with observable modelView, which is based on the provided viewInteractionInterface.
useTransformedStatefulInteractiveModelTransforms provided statifiable model into new stateful InteractiveModel with observable modelView.
FAQs
Lean toolkit for stateful MVC use cases in React
The npm package @mvc-react/stateful receives a total of 119 weekly downloads. As such, @mvc-react/stateful popularity was classified as not popular.
We found that @mvc-react/stateful demonstrated a healthy version release cadence and project activity because the last version was released less than 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.