1.0.0-alpha.1 • Published 8 months ago

@uiless.io/state v1.0.0-alpha.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

State

State is a framework agnostic state management library designed for modern JavaScript and TypeScript applications. Currently in its alpha stage, the library is under active development and not yet stable for production use.

⚠️ Important Notice

  • This package is in alpha. Features, APIs, and behavior are subject to significant changes without notice.
  • Use at your own risk in non-critical projects or for testing purposes.

📦 Installation

To install the package, use the following command:

npm install @uiless.io/state

📚 Documentation

The official documentation is available at state.uiless.io.

Please refer to it for:

  • API references
  • Examples and guides
  • Common pitfalls and FAQs

🔧 Basic Usage

Below is a quick example to help you get started:

import { State } from '@uiless.io/state';

export class Counter extends State {
  constructor(initialValue) {
    super(initialValue); // Initial state
  }

  increase = () => {
    this.update((prev) => prev + 1);
  };

  decrease = () => {
    this.update((prev) => prev - 1);
  };
}

const counter = new Counter(0);

// Subscribe to state changes
counter.subscribe(() => {
  console.log(`Counter updated: ${counter.state}`);
});

// Update state
counter.increase();

For detailed examples, check out the documentation.

🛠️ Contributing

Contributions, feedback, and bug reports are welcome! Please note that the project is in alpha, and contributions might be delayed until the core APIs stabilize.

📜 License

This package is licensed under the MIT License.

Stay updated on the latest developments by visiting state.uiless.io.

1.0.0-alpha.1

8 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago

0.0.0

9 months ago