@beyond-js/reactive

1.1.12 • Public • Published

@beyond-js/reactive

TypeScript JavaScript NodeJS Deno JS Bun Browser

@beyond-js/reactive is a powerful TypeScript library designed to provide a reactive data layer for your application. By offering tools to create and manage reactive data structures, it enables developers to construct performant and scalable applications with ease. It enhances data-driven views or components by reacting to changes and keeping everything in sync.

Main Objects

The library offers three main objects - ReactiveModel, Collection, and Item - each serving a distinct purpose in the reactive data layer.

ReactiveModel is a TypeScript class designed to create reactive properties that can trigger events when they change. It makes use of the Observable pattern to notify subscribers whenever a change is made to the model's properties. It's especially useful in contexts where data-driven views or components are used.

Collection is a reactive data structure designed to handle a set of Items. It extends the ReactiveModel and provides methods for managing a collection of reactive objects. It can load, save, and sync items with both a local database and a remote server.

3. Item

Item is an abstract class that represents a "reactive" object in your application. It extends the ReactiveModel, meaning it can handle changes in its properties and automatically update other parts of the code. Item includes methods for saving, publishing, and syncing data between a local database (like IndexedDB) and an external server.

Installation

To add @beyond-js/reactive to your project, run:

npm install @beyond-js/reactive

For more detailed information about the library and how to use it, refer to the individual READMEs of ReactiveModel, Collection, and Item.

Contributions

Contributions, issues, and feature requests are welcome. Feel free to check the issues page or open a new one.

License

This project is MIT licensed.

Readme

Keywords

none

Package Sidebar

Install

npm i @beyond-js/reactive

Weekly Downloads

348

Version

1.1.12

License

none

Unpacked Size

831 kB

Total Files

114

Last publish

Collaborators

  • ftovar8
  • jircdev
  • hello-beyond