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.3 to 1.0.4

2

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

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

@@ -184,3 +184,3 @@ # easy-react-state

```tsx
useSelector(selector: Selector): selectedState
useSelector: Selector
```

@@ -198,3 +198,4 @@

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.
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. Note the setters which are returned by `createStateManger` are now `wrappedSetters`. If the passed `setters` are returning `state`. Then this `wrappedSetters` are
now returning `void`.

@@ -201,0 +202,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