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

easy-react-state

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

easy-react-state - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name": "easy-react-state",
"version": "1.0.2",
"version": "1.0.3",
"description": "Fun to use state management library for your awesome React app",

@@ -5,0 +5,0 @@ "author": "ombori",

@@ -194,6 +194,6 @@ # easy-react-state

```tsx
setter(...args: any[]): void
setter(...args: any[]): S
```
An object which holds functions which we can use to update the state.
An object which holds functions which we can use to update the state. `easy-react-state` uses the amazing [immerjs](https://github.com/immerjs/immer). When updating a state, you can use mutator syntax like `state.name = 'zion'` for ease. Every setter must return the mutated state or new value. Internally, the state gets mutated inside the `setter` is a `draftState` created by immer. Then immer will create a new object based on the value, either `draftState` or new value, returned by `setter` leaving the `originalState` untouchable.

@@ -200,0 +200,0 @@ ## Cons

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