0.1.1 • Published 6 years ago

@leactive/core v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 years ago

@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