Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-stateful-function

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-stateful-function - npm Package Compare versions

Comparing version 0.1.2 to 0.1.3

2

package.json
{
"name": "react-stateful-function",
"version": "0.1.2",
"version": "0.1.3",
"description": "React Statful Function",

@@ -5,0 +5,0 @@ "main": "index.ts",

@@ -6,3 +6,3 @@ import { useReducer } from 'react';

const [state, dispatch] = useReducer(mini_reducer, initialState);
const setState = (fState = {}) => { for (const type in fState) { dispatch({ type, payload: fState[type] }); } };
const setState = (fState = {}, callback = () => null) => { for (const type in fState) { dispatch({ type, payload: fState[type] }); } callback(); };
const resetState = () => setState(initialState);

@@ -9,0 +9,0 @@ return { state, setState, resetState };

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc