@leactive/core
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

@leactive/core

npm License Build Status Coverage Status types: typescript/flow code style: prettier PRs Welcome

Dead simple and extremely fast state manager | github.com/leactive/core

Installation

Direct <script /> include

The library will be exposed as a global Leactive variable

<script src="https://cdn.jsdelivr.net/npm/@leactive/core@latest"></script>

or via unpkg

<script src="https://unpkg.com/@leactive/core@latest"></script>

NPM

npm install @leactive/core --save

Yarn

yarn add @leactive/core

How It Works

Leactive is reactive, so the store reacts when you change the state. When you create store instance via createStore(options) the library walks through each options.state property and observes it with getters/setters. If the value of the property is an object, Leactive observes this object too. Also if at runtime you assign an object to some of state properties Leactive will also observe it. You can be familliar with this behavior if you have experience in Vue.js

Questions

If you have any troubles, questions or proposals you can create the issue
Good pull requests are also appreciated :)

License

MIT

Copyright (c) 2018 - present, Eduard Troshin

Package Sidebar

Install

npm i @leactive/core

Weekly Downloads

0

Version

0.1.1

License

MIT

Unpacked Size

26.9 kB

Total Files

33

Last publish

Collaborators

  • eazymov