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

onedionys-state-management

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

onedionys-state-management

One Dionys (State Management) - An abstraction for managing and storing the state of applications, making it easier to manage the state of complex applications.

  • 5.0.0
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
2
Weekly downloads
 
Created
Source

Welcome to One Dionys - State Management! 👋

An abstraction for managing and storing the state of applications, making it easier to manage the state of complex applications. 💖

💾 Requirements

  • Web Browser - Can be used as an emulator to build applications. Example [Chrome, Firefox, Safari & Opera].
  • Internet - Because many use CDN and to make it easier to find solutions to all problems.

🎯 How To Use

Example Syntax
const StateManager = require('state-management');

// Create a new state manager instance with initial state
const stateManager = new StateManager({ count: 0 });

// Add a listener to react to state changes
const listener = (state) => {
    console.log('State changed:', state);
};
stateManager.addListener(listener);

// Update the state
stateManager.setState({ count: 1 }); // This will trigger the listener

// Remove the listener
stateManager.removeListener(listener);
Explanation
  • The StateManager class allows you to manage the state of your application. It provides methods to get the current state, set a new state, add/remove listeners to react to state changes, and notify listeners when the state changes.
Return Value
  • getState(): Returns the current state object.
  • setState(newState): Sets the new state by merging it with the existing state object.
  • addListener(listener): Adds a listener function to be called when the state changes.
  • removeListener(listener): Removes a listener function previously added with addListener().

📆 Release Date

  • v1.0.0 : 07 March 2024
  • v1.0.1 : 11 March 2024
  • v4.0.0 : 11 March 2024
  • v4.0.1 : 13 March 2024
  • v4.0.2 : 18 March 2024
  • v5.0.0 : 31 March 2024

🧑 Author

  • Facebook : Oned Ionys
  • Instagram : @onedionys
  • Twitter : @onedionys
  • LinkedIn : @onedionys

📝 License

  • Copyright © 2024 One Dionys
  • One Dionys - State Management is an open source project licensed under the MIT license

☕️ Suppport & Donation

Love One Dionys - State Management? Support this project by donating or sharing with others in need.

Made with ❤️ One Dionys

Keywords

FAQs

Package last updated on 31 Mar 2024

Did you know?

Socket

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.

Install

Related posts

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